NEW YORK (AP) — Donald Trump’s longtime finance chief choked up on the witness stand Thursday, saying he betrayed the Trump family’s trust by scheming to dodge taxes on $1.7 million in company-paid perks, including a Manhattan apartment and luxury cars.

Allen Weisselberg, a senior adviser and former chief financial officer at the ex-president’s Trump Organization, said he conspired with a subordinate to hide more than a decade’s worth of extras from his taxable income, but that neither Trump nor the family were involved.

The Trump Organization is now on trial, accused of helping Weisselberg and other executives avoid paying income taxes on compensation in addition to their salaries. Prosecutors argue the company is liable because Weisselberg was a “high managerial agent” entrusted to act on its behalf.

“It was my own personal greed that led to this,” said Weisselberg, who pleaded guilty to tax crimes and agreed to testify against the company in exchange for a five-month jail sentence.

Asked if he was embarrassed by what he did, a somber Weisselberg said: “More than you can imagine.”

His emotional testimony came on his second day as the prosecution’s star witness, as a company lawyer reminded him on cross-examination of the faith that the Trump family had put in him for decades.

Weisselberg started working for Trump’s father in 1973 and joined Trump as an executive at his then-fledging Trump Organization in 1986. He wielded immense power as the company, buoyed by Trump’s celebrity, grew from a modest New York City developer into a global golf, hotel and real estate empire.

Weisselberg also recalled helping Trump through the company’s dark times in the early 1990s, including casino bankruptcies and the failure of his Trump Shuttle airline. He reminisced about watching Trump’s three eldest children — Donald Jr., Ivanka and Eric — grow up before his eyes, admitting he was “among the most trusted people they knew.”

The Trump Organization denies wrongdoing. The company could be fined more than $1 million if convicted, but a guilty verdict could also hamper its ability to get loans and make deals and lead to attempts by governments, such as New York City, to cancel contracts with Trump entities.

The Trump Organization continues to employ Weisselberg, paying his usual $640,000 salary even after he went on a leave of absence last month. In court, though, the company’s lawyers have portrayed him as a loyal lieutenant who went rogue and concocted the tax dodge scheme on his own without Trump or the Trump family knowing.

Some of Weisselberg’s testimony appeared to underscore that point. But the 75-year-old executive refuted the defense’s contention that his scheme didn’t help the company’s bottom line too. He also detailed another financial arrangement, involving holiday bonuses, that had saved the company money for years.

Weisselberg testified that he conspired to hide his perks with the company’s senior vice president and controller, Jeffrey McConney, by fudging payroll records to deduct their cost from his salary. The arrangement reduced Weisselberg’s tax liability, while also saving the company money because it didn’t have to give him a hefty raise to cover the cost of the perks and additional income taxes he would have incurred.

“I didn’t do an analysis, but I knew there was a benefit to the company,” Weisselberg said. “I knew in my mind that there was a benefit to the company.”

The company’s chief operating officer, Matthew Calamari Sr., also reduced his salary to deduct the cost of a company-paid apartment and cars for him and his wife, but Weisselberg denied they were in cahoots. He said he had no knowledge of or involvement in what Calamari was doing.

Calamari has not been charged with a crime. McConney, who was granted immunity, testified for the first five days of the trial in state court in Manhattan.

Weisselberg told jurors that Trump signed off on his apartment lease and, until becoming president in 2017, personally paid private school tuition for his two grandchildren.

The company, however, did have a longstanding practice to avoid taxes on the lucrative Christmas bonuses that Trump handed out each year to his company’s executives.

Weisselberg said the company ducked taxes for decades by drawing some bonus checks signed by Trump from subsidiary entities and paying executives as independent contractors, allowing the company to avoid payroll taxes and the subsidiaries to deduct the bonuses as expenses.

Weisselberg said the practice began before he started at the Trump Organization and was only abandoned after a tax lawyer audited the company’s pay practices once Trump became president in 2017.

Trump “always wanted to sign the bonus checks,” Weisselberg said — applying his distinct, seismograph-like signature to a stack of 70 or more made out to key company officials, including Weisselberg and Calamari.

The checks would then be stuffed into Christmas cards, also signed by Trump, who handed them out like Santa Claus to executives around the building.

The Trump Organization switched to paying executive bonuses entirely as taxable employee income once Trump went to the White House.

“We were going through an entire cleanup process at the company. With Mr. Trump now president, we wanted to make sure everything was done properly,” Weisselberg said.

___

Follow Michael Sisak on Twitter at twitter.com/mikesisak and send confidential tips by visiting https://www.ap.org/tips/.