ALEXANDRIA, Va. — Prosecutors were warned Thursday to avoid stoking class envy as they build their tax and bank fraud case against President Trump’s former campaign chairman.

Federal Judge T.S. Ellis III scolded Special Counsel Robert Mueller’s team at the start of proceedings at Day 3 of Paul Manafort’s trial.

“Don’t show me closets full of clothing,” Ellis said before the jury entered the courtroom.

Ellis also told prosecutors to not “gild the lily” as they seek Manafort’s conviction.

“All the evidence of fancy suits or the pagodas, or whatever it is, really is irrelevant and kind of besmirches the defendant,” Ellis said.

“It kind of engenders some resentment against rich people.”

Ellis’ instructions came a day after a parade of prosecution witnesses detailed years of lavish spending by Manafort, 69.

His pricey purchases included $3.3 million worth of luxury home renovations, about $1 million of custom-tailored clothing, antique silk rugs and a Mercedes-Benx SL 550 roadster.

The judge’s mention of “pagodas” was an apparent reference to a pergola made of American cedar, with wisteria and climbing hydrangea, that was inspired by one in Central Park.

It was installed as part of a $104,000 “outdoor garden concept” at the $1.9 million home that Manafort bought for his daughter, Andrea, in Arlington, Va.

Ellis took exception to the prosecution’s tactics several times during Wednesday’s testimony, and refused to let them show jurors photos of multiple closets filled with Manafort’s pricey suits.

“Enough is enough,” the judge said at one point.

“We don’t convict people becasue they have a lot of money and throw it around.”

Prosecutors allege that Manafort’s extravagant lifestyle was funded by millions of dollars he made working for pro-Russia pols in Ukraine and stashed in banks in Cyprus to avoid paying US taxes on the income.

Manafort is also accused of scamming millions of dollars in loans by lying to American banks when his work in Ukraine dried up.