NEW YORK (AP) — Donald Trump reported losses on his tax returns every year for a decade, including nearly $700 million in 2009 and $200 million in 2010, his longtime accountant testified Tuesday, confirming long-held suspicions about the former president’s tax practices. “There are losses for all these years,” said Bender, who was granted immunity to testify at the Trump Organization’s criminal tax fraud trial in Manhattan.

Donald Bender, a partner at Mazars USA LLP who spent years preparing Trump’s personal tax returns, said Trump’s reported losses from 2009 to 2018 included net operating losses from some of the many businesses he owns through his company. The short exchange amounted to a rare public discussion of Trump’s taxes—which the Republican has fought to keep secret—even if there was no obvious connection to the case at hand.

Prosecutor Susan Hoffinger questioned Bender briefly about Trump’s taxes on cross-examination, at one point showing him copies of Trump tax paperwork that the Manhattan district attorney’s office fought for three years to obtain, before moving on to other topics.

The Trump Organization, the holding company for Trump’s buildings, golf courses, and other assets, is charged with helping some top executives avoid income taxes on compensation they got in addition to their salaries, including rent-free apartments and luxury cars. If convicted, the company could be fined more than $1 million.

Trump is not charged in the case and is not expected to testify or attend the trial. The company’s former finance chief testified that he came up with the scheme on his own, without Trump or the Trump family knowing. Allen Weisselberg, testifying as part of a plea deal, said the company also benefited because it didn’t have to pay him as much in salary.

Bender’s testimony came on a day full of Trump-related legal drama, including the Supreme Court clearing the way for Congress to get six years’ worth of tax returns for Trump and some of his businesses. Also Tuesday, the judge in New York Attorney General Letitia James’ civil fraud lawsuit against Trump and his company set an October 2023 trial date; a federal appeals court heard arguments in the FBI’s Mar-a-Lago documents investigation; and Sen. Lindsey Graham, a Trump ally, testified before a Georgia grand jury probing alleged 2020 election interference.

Bender’s tax loss testimony echoed what The New York Times reported in 2020, when it obtained a trove of Trump’s tax returns. Many of the records reflected massive losses and little or no taxes paid, the newspaper reported at the time.

The Times reported that Trump paid no income tax in 11 of the 18 years whose records it reviewed, and that he paid just $750 in federal income tax in 2017, the year he became president. Citing other Trump tax records, The Times previously reported that, in 1995, he claimed $915.7 million in losses, which he could have used to avoid future taxes under the law at the time.

Manhattan prosecutors subpoenaed Bender’s firm in 2019, seeking access to eight years of Trump’s tax returns and related documents, finally getting them after a protracted legal fight that included two trips to the Supreme Court. Bender handled tax returns and other financial matters for Trump, the Trump Organization, and hundreds of Trump entities starting in the 1980s. He also prepared taxes for members of Trump’s family and other company executives, including Weisselberg and Weisselberg’s son, who managed a company-run ice rink in Central Park.

Weisselberg, who pleaded guilty in August to dodging taxes on $1.7 million in extras in exchange for a five-month jail sentence, testified that he hid company-paid extras such as Manhattan apartments and Mercedes-Benz cars from his taxable income by having the company’s comptroller, Jeffrey McConney, reduce his salary by the cost of those perks. Bender testified that Weisselberg kept him in the dark on that arrangement—and that he only found out about it from prosecutors last year.

But emails shown in court Tuesday suggested that McConney tried to loop him in as early as 2013, with attached spreadsheets listing Weisselberg’s pay and reductions for extras, including Trump-paid tuition for his grandchildren’s private schooling. Bender, who testified that he got numerous emails from Trump executives daily, said he didn’t recall seeing those messages. If he had, he said, “We would have had a serious conversation about continuing with the client.”

Mazars USA LLP has since dropped Trump as a client. In February, the firm said annual financial statements it prepared for him “should no longer be relied upon” after James’ office said the statements regularly misstated the value of assets—an allegation at the heart of her lawsuit. Trump blamed Bender and Mazars for the company’s troubles, writing on Truth Social last week: “The highly paid accounting firm should have routinely picked these things up – we relied on them. VERY UNFAIR!”

Bender testified that he put the onus on Weisselberg to fix any problems as scrutiny of the Trump Organization intensified after Trump’s election in 2016 and advised him to stop one dubious practice: the company’s longstanding, tax-saving habit of paying executive bonuses as freelance income. The accountant said he told Weisselberg: “If there is anything bothering you, even if there’s the slightest chance, we have to set the highest standards so the company should be, effectively, squeaky clean.”