The defense rests … and, boy, does he need it!

The self-described “oldest trial lawyer at 100 Centre Street” hung up his legal briefs mid-case Tuesday in Manhattan Supreme Court as a judge declared a mistrial, citing his declining ability to defend his client.

“I don’t think you should be trying cases,” Judge Ruth Pickholz bluntly told Leonard Levenson, 87, urging him to step down as lead defense lawyer for nanny Marianne Benjamin-Williams, accused of stuffing a balled-up baby wipe down the throat of an infant in her care, nearly killing the tot.

Levenson, who has been a defense lawyer for 61 years, accepted the ruling with grace befitting his years.

“After reflection, I kind of agree with you,” the aged attorney told Pickholz. “These things creep up on you. As you get older, you don’t realize it. You don’t hear as well.”

Pickholz accepted Levenson’s offer to stay on the case in a supportive role, though co-counsel Raymond Loving will take point for the defense going forward.

Both lawyers were appointed to Benjamin-Williams’ case by the court.

“I think you should stay on as a supportive position,” Pickholz said during the bizarre hearing, for which the trial’s jury was not present. “Mr. Levenson, you have had a long and distinguished career.”

That’s putting it mildly: Levenson said he’s been practicing law since 1957, when Dwight Eisenhower was in the White House, Mickey Mantle roamed center field for the Yankees, and the Soviet Union launched the Sputnik satellite.

“Basically, I’m just getting too old,” Levenson admitted to reporters after the hearing. “You just don’t realize that your faculties begin to decrease.”

Levenson also acknowledged that he’s been having problems with his vision and hearing, the latter of which caused him to repeat questions to prospective jurors during selection, not realizing they’d already been asked.

He also stumbled over words during opening statements in the Benjamin-Williams case.

“I was tongue-tied and somewhat incoherent,” Levenson said. “I got very little sleep the night before. It reads better than it sounded.”

When his co-counsel, Loving, made a motion that Levenson step aside, the elderly lawyer was, at first, upset.

“My ego was hurt terribly,” Levenson said.

But after taking the weekend to talk over his future with his wife and two daughters, he’s come around to the perks of a lighter load.

“It’s awfully nice sleeping in late,” he said, adding that, “I am going to spend the winter in the Caribbean.”

Still, Levenson has strong feelings about the case on which he’s now handing over the reins.

“I would very much like to see [Benjamin-Williams] acquitted. I feel very strongly about her innocence,” he said. “There is no motive to kill [the victim or his older sister]. She is well-balanced, she doesn’t have psychological problems.”

Stepping aside isn’t easy for Levenson, who takes with him one distinction of which he’s proud: “I was told I’m the oldest trial lawyer at 100 Centre Street,” he said, referring to Manhattan Criminal Court.