In a cringeworthy twist on “the dog ate my homework,” a Brooklyn lawyer who was unprepared to go to trial convinced a federal judge that he needed more time — because his mother had died.

Trouble was, the mother of lawyer John Nonne­n­macher was very much alive, The Post has learned.

Nonnenmacher had sent his co-counsel, Jason Leventhal, to court on March 21 just an hour before opening statements to tell Brooklyn federal Judge Allyne Ross the sad news.

Ross believed it, granting a one-week delay in the ­police brutality case and telling Leventhal, “The court is sorry for Mr. Nonnen­macher’s loss,” according to court papers.

But the suspicious co-counsel hired a private investigator, who learned three days later that Nonnen­macher’s mother, Carol, ­although recovering from a fall, was still among the ­living, the papers state.

The judge was livid — especially since Nonnenmacher had claimed in February that he couldn’t meet another deadline because his uncle had died.

It’s unclear whether that, too, was a fabrication.

“The court has been ­unfairly inconvenienced by the conduct of plaintiff’s counsel over the past several weeks,” Ross railed upon hearing the news from the co-counsel, slamming Nonnenmacher in his absence “for his blatant disregard and repeated violation of court-ordered deadlines.”

Ross vowed to “deal with Mr. Nonnenmacher, his disqualification as counsel and appropriate discipline and sanctions at another time” — and lashed out at how “the schedules of defendants, their lawyers and their witnesses — including numerous medical professionals — have been disrupted by this conduct.”

“I never imagined for a second that Mr. Nonnenmacher would lie to me about his mother passing,” Leventhal replied, according to a transcript.

Angry city lawyers are now lobbying for cash sanctions against Nonnenmacher, Leventhal and plaintiff Isa Martin, 34, whose case wound up being dismissed.

“As soon as I confirmed that Mr. Nonnenmacher’s representations were untrue, I told the court and the city’s lawyers,” Leventhal told The Post. Nonnenmacher could not be reached for comment.