A major donor to New York City's mayor testified Thursday that he gave money to Bill de Blasio’s campaign fund in exchange for access and favors.

Jona Rechnitz, 34, a felon who pleaded guilty in March to making contributions in exchange for favors from government officials, made the claim when he appeared as a witness in the corruption trial of former city correction-union chief Norman Seabrook.

Rechnitz is accused of bribing Seabrook to invest $20 million in union pension money in a friend’s hedge fund, the New York Post reported.

But the topic quickly moved on to de Blasio, with whom Rechnitz had a history.

“We’re going to become significant contributors, but we want access,” he claimed to have to told de Blasio fund-raiser Ross Offinger.

After committing to about $50,000 to $100,000 in donations, the favors began to come in. He said in court that de Blasio “told me to call if there’s anything I need, always be in touch, and he really appreciated my support and friendship.”

The mayor denied being close to him, saying his relationship with the man was “not a particularly close,” despite Rechnitz's claim that he received de Blasio's personal cell-phone number and e-mail address.

“I e-mailed him on his personal e-mail. We would chat. I’d go to events of his. He invited me to events and put me in very good-seated areas. He took my calls. I mean, we were friends,” he told the court, according to the Post.

He said he was ready to give money to the mayor whenever as long as he received favor from City Hall. “I always gave money, as long as I was seeing him produce results,” he said of Offinger. “Whenever we would call him for access or for a favor, we were getting the response that we expected and the results we were expecting.”

Rechnitz said he once called de Blasio’s fundraiser regarding his friend’s massive water bill and violations he faced for a tenant subletting a residence on Airbnb, the Post reported.

Mayoral spokesman Eric Phillips rejected Rechnitz accusations, telling the Post that “These are nothing but reheated, repackaged accusations that have been extensively reviewed and passed on by authorities at multiple levels.”

“The administration has never and will never make government decisions based on campaign contributions,” he added.

Back in March, de Blasio narrowly avoided federal charges for violating election law in regard to fundraising, despite the authorities’ claims that the campaign has violated “intent and spirit” of the law, the Post reported.