Former Trump campaign chairman Paul Manafort hit the roof when faced with an enormous tax bill that he then “tasked” his then-right-hand man with lowering, according to court testimony Tuesday.

Rick Gates, the government’s star witness against Manafort at his tax-fraud trial, told jurors that Manafort was “not happy” when he learned how much he’d have to shell out in taxes.

“WTF,” Manafort wrote in a 2015 email, according to the Washington Post.

Gates said Manafort ordered him to deal with accountants and hide cushy payments from his consulting work with pro-Russia politicians in Ukraine as loans.

“We needed to determine how we could lower the taxes,” Gates said in his second straight day of testimony in Virginia federal court.

According to testimony last week, one of Manafort’s accountants was dubious about a $900,000 loan that appeared on the political operative’s 2014 taxes.

Gates was asked whether that $900,000 payment was, in fact, a loan.

“It was not,” he said.

Gates said he was acting at “Mr. Manafort’s direction” when he told tax preparers that it was.

Earlier in the day, Gates said he and Manafort talked about whether Manafort’s bank accounts in Cyprus and the Grenadines needed to be disclosed — a point that’s pivotal to prosecutors’ case.

Manafort faces various tax-fraud charges for allegedly failing to file reports involving foreign bank accounts between 2011 and 2014 and bank fraud connected to loans he took out for residential properties.

Gates, who was charged alongside Manafort, is testifying as part of a deal he struck with special counsel Robert Mueller. Gates pleaded guilty to conspiracy and lying to the FBI and agreed to cooperate in exchange for a lighter prison sentence.

He appeared confident on the witness stand, never once looking over at Manafort, who stared at him the entire time.