Bernard Madoff’s former operations chief testified Tuesday that he always trusted his boss, who “seemed to have the respect of the entire world” for decades, before Madoff admitted orchestrating a massive Ponzi scheme.

“Now, I think he’s a terribly ill man, and it’s difficult to reconcile everything I knew for 40 years and what I know now,” the former employee, Daniel Bonventre, said in Manhattan fedearl court under questioning by his attorney Andrew Frisch, a solo practitioner.

Madoff, who is serving a 150-year prison sentence, squandered nearly $20 billion from thousands of investors over several decades.

Bonventre has pleaded not guilty to fraud charges. Authorities say he cooked the books to throw off regulators. He’s on trial before Southern District Judge Laura Taylor Swain (See Profile) with four other former Madoff employees.

The defense claims Bonventre worked for the legitimate broker-dealer side of Madoff’s business and did not know about Madoff’s criminal activities.

Bonventre called Madoff “extremely intelligent” and noted his achievements in the industry, including his stint as NASDAQ chairman.

“He appeared to be the most magnanimous, caring individual,” said Bonventre. “Amazing to watch, a very empathetic individual. At least that’s how he appeared.”

Now, he said, he realizes that Madoff “hurt so many people with what he did. There was no generosity of spirit. None of that was real.”

Bonventre said he started at the firm in 1968 as a clerk, rising to director of operations, a title he gave himself because customers wanted to know his role.

The case is being prosecuted by Southern District Assistant U.S. Attorneys Matthew Schwartz, John Zach and Randall Jackson.