The judge presiding over Paul Manafort’s bank and tax fraud trial apologized Thursday for flipping out on prosecutors in front of jurors during testimony of an expert witness the day before.

Virginia federal Judge T.S. Ellis instructed jurors to dismiss his angry outburst a day earlier and admitted he was wrong.

“Put aside my criticism,” the red-faced jurist told the panel, adding: “This robe doesn’t make me anything other than human.”

Ellis lost his cool at the start of IRS Special Agent Michael Welch’s testimony, after the witness, who was testifying for the government, said he had been in the courtroom for some of the trial.

In a heated exchange with Assistant US Attorney Uzo Asonye, the judge insisted he had never authorized Welch to watch the trial — which Asonye challenged.

“Appreciate it, your honor,” Asonye said, according to court records. “We’ll check the transcript but we believe that we said case agent and expert witness [were allowed].”

“Well let me be clear: I don’t care what the transcript says,” Ellis snapped. “Maybe I made a mistake. But I want you to remember, don’t do that again. When I exclude witnesses, I mean everybody. Now, it may be that I didn’t make that clear. It may be that I did allow this, but don’t do it in the future.”

Witnesses typically are barred from sitting in the courtroom, except in the case of certain expert witnesses like Welch, or unless specifically approved by the judge.

Asonye was allowed to continue questioning Welch — who went on testify that Manafort didn’t report at least $16 million on his tax returns between 2010 and 2014 — but prosecutors worried that the damage had already been done.

They filed a motion Thursday saying the tongue-lashing could be prejudicial to their case — and asked for the judge to explain that he had been wrong.

“While mistakes are a natural part of the trial process, the mistake here prejudiced the government by conveying to the jury that the government had acted improperly and had violated court rules or procedures,” prosecutors wrote.

They argued that the flare-up could lead jurors to not find Welch’s testimony credible — or, worse, assume the government was trying to “secure an unfair advantage” by having him in the courtroom.

Ellis, who cracked jokes with potential jurors during jury selection, has ripped prosecutors in Manafort’s trial before for a gamut of issues, including the pace of their questioning, for making repeated references to Manafort’s lavish wardrobe expenses and even for rolling their eyes.

Wednesday was no different, as the judge nitpicked over the amount and type of charts that prosecutors could use during the testimony of an accountant.

“Judges should be patient. They made a mistake when they confirmed me. I’m not very patient, so don’t try my patience,” said Ellis, who was appointed to the bench by President Ronald Reagan.

With Post wires