Seven years after he resigned in the middle of his term amid scandal, former Philadelphia Sheriff John Green took the stand Monday in his federal bribery and corruption trial, and denied accepting hundreds of thousands of dollars in benefits — from free campaign ads to a great deal on a house – in exchange for granting tens of millions of dollars in contracts to an advertising firm.

"I made a lot of mistakes," Green told the jury in U.S. District Court in Philadelphia. "But I never gave anyone anything in exchange for gifts or bribes."

Green, 70, a former Philadelphia police officer who first ran for office as a reformer, served as sheriff from 1990 to 2010. Federal prosecutors say that during those two decades he heaped more than $35 million in no-bid work upon the firm of a co-defendant, former journalist James Davis. Davis, 67, testified in his own behalf last week and also denied any wrongdoing.

During the five-week, document-filled trial, prosecutors have contended that Davis showered almost $800,000 in benefits on his close friend Green, including a job for the sheriff's wife that paid her $232,000 over six years, $70,000 in free campaign advertising, tens of thousands more in campaign contributions far in excess of legal limits, and a $258,000 no-interest loan so he could buy a Florida retirement home near Disney World.

The case is largely circumstantial. Prosecutors are asking the jury to connect what they have called a "stream of benefits" flowing to Green and the lucrative work given to Davis, but have not buttressed their theory with any evidence of an explicit quid pro quo agreement between the men.

Green told jurors that his wife had established her own track record as an experienced human-resources expert in hiring, but that he was barely aware that she was working for Davis beyond one passing conversation about that. "I wasn't really paying attention to my wife's business," he testified.

He was dismissive of the suggestion that Davis and his late business partner had renovated a home for him in Mount Airy and sold it to him at a loss. He described the place as a dump with broken awnings, busted garage doors, and a Jacuzzi that "never worked."

"I think I overpaid," he said.

Green was charged in 2015. He quit his post four years before that, halfway through his sixth term, just as his office was about to be hit with a series of scathing audits by the City Controller's Office. His successor immediately canceled the contract with Davis' firms, although the office kept up the heavy spending on advertising that provided much of the firms' income.

On the stand, Green was an almost shy figure, slight and trim, balding with a thick mustache. On direct examination,  Green's defense lawyers elicited answers aimed at portraying him as an ordinary guy who liked to play golf with his buddy Davis on municipal courses, as someone willing to take on the banks and the bar to help people at risk of losing their homes to foreclosure.

Green repeatedly praised Davis' business, Reach, saying it kept on ably tackling new tasks as his office ran into problems. The firm's motto is: "Reach us and we reach the community."

"In a nutshell," Green testified, "the Sheriff's Office would not have been able to function in my tenure if it were not for Reach."

On cross-examination, Assistant U.S. Attorney Sarah Grieb pressed the former sheriff to admit that he was bound by the same ethics code he had imposed on his employees, including a provision that required them to report any "stakeholder" involved with the office who offered them a benefit and to refrain from decisions in which they had a personal financial interest. Green was reluctant to do so, repeatedly saying he had to heed his oath of office, but not the ethics policies.

As the lengthy trial winds down, Davis and Green are the closers for the defense. When asked if he had traded benefits to Green for contracts, Davis responded: "Absolutely not."

Under cross-examination from Assistant U.S. Attorney Christopher Diviny, Davis denied that he had gotten his daughter to give $2,500 to Green's campaign fund with the promise that he would pay her, a violation of election law. Diviny then read from the daughter's grand jury testimony: "He gave me the money for the check."

The cross-examination of Green is to resume Tuesday.