President Trump’s former campaign chairman spent more than a million dollars on business suits over five years, using foreign bank accounts to pay for cars, clothes and real estate in what federal prosecutors ­portrayed Wednesday as a tax-dodging scheme to support his extravagant lifestyle.

The second day of Paul Manafort’s trial in Alexandria, Va., included detailed accounts of the political consultant’s free-spending ways, including buying some of the most expensive suits in the world and purchasing his daughter’s $1.9 million home, which he paid for with cash. But throughout the proceedings, U.S. District Judge T.S. Ellis III snapped at prosecutors, complaining that they were too ­focused on Manafort’s wealth rather than evidence of his alleged crimes.

The testimony came as President Trump publicly came to Manafort’s defense, tweeting that prosecutors were treating him unfairly and attacking the investigation by special counsel Robert S. Mueller III that led to the charges against Manafort.

Before he joined the Trump campaign, Paul Manafort made a name for himself in the D.C. lobbying world, but his past caught up with him.

“Attorney General Jeff Sessions should stop this Rigged Witch Hunt right now, before it continues to stain our country any further,” the president tweeted. Typically, government officials refrain from commenting on criminal cases, particularly when those cases are on trial. Trump’s lawyer Jay Sekulow said the president had issued no directive or order to the Justice Department about the matter but was voicing his opinion.

At the courthouse, where Manafort is fighting 18 counts of tax and bank fraud, the jury of six men and six women heard from a parade of witnesses who sold Manafort clothes, a home and home renovations.

One witness, Maximillian Katzman, said Manafort was one of the best customers at the luxury menswear boutique where he used to work in Midtown Manhattan.

Between 2010 and 2014, Manafort spent $929,000 at the store on an unusually high number of suits, Katzman testified. While most customers paid by check, Katzman said, Manafort was their only customer at that time who paid by wire transfers from foreign bank accounts.

Prosecutors have said the accounts Manafort used were not declared to the Internal Revenue Service, part of a long-running scheme, they allege, to evade paying taxes on millions of dollars in income.

On the witness stand, Katzman was asked to review invoices from Manafort’s purchases. It took him a while to flip through a book of exhibits — invoice after invoice.

Manafort spent more than $100,000 at the store in 2010 and more than $444,000 in 2013, according to Katzman.

The accounting of suit costs aggravated Ellis, who has admonished prosecutors not to ­belabor the details of Manafort’s lavish lifestyle but to stick to the evidence that supports the charges.

“Let’s move on, enough is enough,” the judge said, allowing the witness to describe the annual spending but not the total amount over the multiyear ­period. The jury, the judge said, “can add.”

Manafort was also a customer of House of Bijan, another luxury menswear shop. Between 2010 and 2012, Manafort spent $334,000 at the shop, which bills itself as “the world’s most expensive store.”

The store’s chief financial officer, Ronald Wall, testified that Manafort paid for the clothes with wire transfers.

As with earlier witnesses, the subject of Manafort’s spending irritated the judge, who told prosecutors, “You have to prove beyond a reasonable doubt that he signed tax documents to show he knowingly didn’t represent his true income.”

At one point, the judge seemed confused by the brand names being tossed about.

“I can’t recognize these names,” Ellis said. “If it doesn’t say ‘Men’s Wearhouse,’ I don’t know it.”

The judge told prosecutors they could not enter as evidence an invoice for home renovations, saying: “All this document shows is that Mr. Manafort had a lavish lifestyle. He had a nice home with a pool and a gazebo; it’s not relevant.”

While Ellis was particularly tough on the prosecution team, he complained to attorneys on both sides about their facial expressions.

Ellis said he was told that attorneys had “rolled their eyes” after leaving discussions at his bench. The implication, he said, is, “Why do we have to put up with this idiot judge?” He told them that such behavior was inappropriate and should stop.

The charges against Manafort grew from Mueller’s investigation into Russian interference in the 2016 presidential election and whether Americans conspired with those efforts.

The trial, however, is not about Russia or any such conspiracy, focused instead on the personal and business finances of Manafort. Prosecutors charge that Manafort made millions of dollars in unreported income while working as a political consultant for the Ukrainian government and that when those funds dried up in 2014, he began lying to banks to get loans that would keep funding his lifestyle.

The judge has warned prosecutors not to inject Russian matters into the case and on Wednesday morning instructed them not to use the word “oligarch” when describing some of the people connected to the case.

“An oligarch is just a despotic power exercised by a privileged few,” Ellis said. “What I want to avoid . . . is somehow to use the term to mean he was consorting or paid by people who were criminals — there will be no evidence of that.”

At the judge’s urging, the trial has gotten off to a fast start, and it seemed to only accelerate on its second day. At one point, prosecutor Uzo Asonye said it was possible that the star witness in the case, Manafort’s former right-hand man Rick Gates, may not be needed to testify. That was met with skepticism in the courtroom.

Gates has pleaded guilty to lying to the FBI as part of a cooperation deal with prosecutors, and Manafort’s attorneys have indicated that they plan to say Gates, not his boss, was the one who lied about finances.

On Wednesday, the prosecutors brought eight witnesses to the stand. They said they could finish presenting their case by next week, so Manafort’s trial could be shorter than the three weeks initially predicted.

Matt Zapotosky contributed to this report.