Donald Trump has switched from criticising contributions to the Clinton Foundation to defending an illegal campaign contribution from his own charity to a Florida attorney general who had been considering launching an investigation into the controversial Trump University.

Trump donated $25,000 (£19,000) through his charity to a group supporting attorney general Pam Bondi in 2013, just weeks before she opted not to join a New York state court action charging the Trump business with fraud. The contribution was reportedly solicited by Bondi.

Trump made the donation from his charitable foundation, in violation of tax regulations as tax-exempt charitable groups are not allowed to make political contributions. He had to pay a $2,500 (£1,870) penalty to the Internal Revenue Service, the Washington Post has reported.

But beyond breaking tax law, the contribution is causing particular problems for Trump because critics say it appears that he was attempting to buy his way out of a court action.

Just days before the donation, the Orlando Sentinel reported that the New York State attorney general's office had sued Trump University and noted that Bondi's office was considering whether to join in the litigation.

Former New York Attorney General Eric Schneiderman had filed a $40m (£30m) lawsuit alleging that Trump had defrauded more than 5,000 individuals through Trump University, which was never licenced as an educational institution.

Donald Trump
Republican presidential nominee Donald Trump pauses during a campaign event. He has had to defend contributions from his charity to the Florida attorney general Alex Wong/ Getty Images

After the campaign contribution, Bondi decided not to join the suit. Trump then hosted a lavish fundraiser for Bondi at his Mar-a-Lago resort in March 2014, and Bondi endorsed Trump this year.

Trump and Bondi have denied any connection between his donation and Bondi's decision not to proceed with an investigation. Trump has called Bondi "beyond reproach" and said that he "never spoke to her about that at all," apparently meaning the court action against Trump University.

Trump campaign manager Kellyanne Conway insisted on Bloomberg that any suggestion of a tit-for-tat deal between the two was "ridiculous."

Trump has a very different attitude about another official who made a court ruling concerning Trump University — American-born Hispanic US Federal Judge Gonzalo Curiel. After Curiel ordered that documents in court actions against Trump's institution be released, the candidate claimed he was "railroaded" by the judge because of his anger that Trump aims to build a wall to keep Mexicans out of the country.

Pam Bondi
Florida Attorney General Pam Bondi speaks at the Republican National Convention in Cleveland. She was going to launch an investigation into Trump university Reuters

Curiel "happens to be, we believe, Mexican," Trump said at a rally at the time, adding: "I think Judge Curiel should be ashamed of himself. I think it's a disgrace that he is doing this."

As for political officials, Trump boasted during the first primary debate that he donates frequently to candidates and then expects them to help him when he needs it. "When they call, I give," he said. "And you know what? When I need something from them two years later, three years later, I call them, they are there for me."

Substantial donor

He told the Wall Street Journal in 2015: "As a businessman and a very substantial donor to very important people, when you give, they do whatever the hell you want them to do."

It was hardly the first time the Republican presidential candidate has broken campaign limit laws.

In the 1980s, Trump admitted he gave tens of thousands of dollars to the president of the New York City Council through 18 subsidiary companies in order to evade contribution limits, the New York Times reported. He contributed $150,000 (£112,000) to candidates in 1985.

In the 1990s, the Federal Election Commission fined Trump for exceeding the annual limit on campaign contributions by $47,00 (£35,000), the biggest violation in a single year.

In 2000, the New York State lobbying commission imposed a $250,000 (£187,000) fine after Trump dodged disclosing the extent of his lobbying of state legislators, the Times reported.

Former Texas State Attorney General Greg Abbott also looked into complaints against Trump University. He received a $35,000 (£26,000) contribution from Trump for his successful 2014 bid to become governor.