Image copyright Reuters Image caption Mr Trump has previously said he knew nothing of the payment to Ms Daniels

President Donald Trump personally repaid his lawyer the $130,000 that was used to buy an adult film actor's silence about an alleged affair, his legal aide Rudy Giuliani has said.

It appears to contradict Mr Trump, who said he did not know about the payment made by lawyer Michael Cohen to Stormy Daniels ahead of the 2016 election.

Mr Trump has denied Ms Daniels' claims of an affair in 2006.

Mr Giuliani said no campaign finance was used, a key issue in the matter.

What did Mr Giuliani say and why?

The former New York City mayor recently joined Mr Trump's legal team and was talking to Sean Hannity on Fox News.

The campaign finance issue appeared to be one his main motives for appearing on the programme - to deny that there was any wrongdoing.

Mr Cohen's $130,000 (£95,650) payment to Ms Daniels just before the 2016 election could count as an illegal contribution to President Trump's campaign.

Mr Giuliani said: "That money was not campaign money. Sorry, I'm giving you a fact now that you don't know. It's not campaign money. No campaign finance violation.

"They funnelled it through a law firm and the president repaid it."

He added that the president "didn't know about the specifics of it, as far as I know, but he did know about the general arrangement that Michael would take care of things like this".

Mr Giuliani later spoke to the New York Times, saying: "Some time after the campaign is over, they set up a reimbursement, $35,000 a month, out of his personal family account." The sum paid was $460,000-$470,000, including expenses, he said.

He also said Mr Trump was aware of what he was going to say on Fox News and that he had spoken to the president before and after the interview.

What are the issues over campaign finance?

US federal law restricts how much individuals and organisations can contribute to campaign financing and there are also strict regulations on the disclosure of the financing.

The first question is whether the payment to Ms Daniels was campaign related. Legal expert Lawrence Noble told the Washington Post: "If the purpose of this was to stop [Daniels] from hurting the campaign, then what you have is Cohen made a loan to the campaign."

The $130,000 would exceed the amount an individual can donate to a presidential campaign.

Image copyright AFP Image caption Michael Cohen is facing a criminal investigation over the matter

Any repayment by the Trump campaign would violate the law.

But presidential candidates are allowed to contribute an unlimited amount to their own campaign. Mr Trump may be arguing, through Mr Giuliani, that the personal nature of the repayment makes it legal.

However, if the $130,000 is deemed to have been a loan, the president could face questions as to why his personal financial disclosure form from June 2017 made no mention of any debt to Mr Cohen.

The repayment would have had to be disclosed to the Federal Election Commission if it were an election-related expense. A wilful violation could be a crime.

Ms Daniels' lawyer said it would need to be determined whether the payment was hidden in such a way as to violate anti-money laundering statutes.

So does this contradict the president?

When asked by reporters a month ago if he knew about the payment to Ms Daniels, Mr Trump said: "No."

When asked why the payment was given to Ms Daniels, he added: "You'll have to ask Michael Cohen."

The president might argue that the lawyer "took care of things like this", as Mr Giuliani suggested and that he knew nothing of the "specifics", making the repayment personally later.

Mr Giuliani told the Times he did not know whether Mr Trump was aware of the payment to Ms Daniels at the time but his understanding was that the president had only learned about it recently. It is unclear how this fits with his statement that repayments were made over several months.

Speaking on Fox TV last week, Mr Trump suggested some knowledge of the matter in admitting Mr Cohen had represented him during the "crazy Stormy Daniels deal", but did not go into specifics.

Mr Cohen, for his part, told the New York Times in February: "Neither the Trump Organization nor the Trump campaign was a party to the transaction with Ms Clifford, and neither reimbursed me for the payment, either directly or indirectly."

How this relates to any personal repayments by Mr Trump is unclear.

What has been the reaction?

Ms Daniels' lawyer, Michael Avenatti, said that Americans "should be outraged" at Mr Giuliani's comments.

"We predicted months ago that it would be proven that the American people had been lied to as to the $130k payment and what Mr Trump knew," he wrote on Twitter.

He told Associated Press: "Mr Trump evidently has participated in a felony and there must be serious consequences for his conduct and his lies and deception to the American people."

Stormy clouds not going away

Analysis by BBC's Anthony Zurcher in Washington

There are two ways to look at Rudy Giuliani's blockbuster revelation.

The first is that the former New York mayor was freelancing and caught the president and the White House communications team flatfooted. In that case, Mr Giuliani's brief return to the political spotlight will be short-lived.

The other possibility is that this was a pre-planned revelation in the friendly confines of Sean Hannity's Fox News talk show. Some in the White House may have been caught by surprise, but there was a strategy in play. Perhaps Mr Giuliani and the president decided that the legal exposure from hiding that Mr Trump made the payment was more dangerous than the political risk from admitting he cut the cheque and lied about it.

Mr Trump has proven bulletproof when it comes to most political scandals and this one may prove no different, although the Stormy saga has proven to have staying power. Even with the revelation, the president and Mr Cohen's payment may still constitute a campaign finance law violation.

The Stormy clouds aren't going away.

How did the payment come about and what has happened since?

The payment relates to allegations by Ms Daniels that she had sex with Mr Trump in 2006, allegations he denies.

After initially denying the payment, Mr Cohen eventually admitted he had paid the sum privately to Ms Daniels, real name Stephanie Clifford, in October 2016 out of his own funds in exchange for her silence in a non-disclosure agreement.

Media playback is unsupported on your device Media caption Stormy Daniels: "I was threatened"

He denied that Mr Trump was a party to the transaction.

Mr Cohen is now facing a criminal investigation. FBI agents searched his home and office in New York recently in relation to the nondisclosure agreement.

In March this year, Ms Daniels filed a lawsuit against the president, alleging that the agreement was invalid because Mr Trump did not sign it.

She later lost a court motion for Mr Trump to give sworn testimony about her claim that they had a relationship.

While Mr Trump has denied her claims, his lawyers are seeking $20m in damages from Ms Daniels, arguing she broke the non-disclosure deal.

Ms Daniels is also suing the president over a "defamatory" tweet he posted after she said she was threatened by a man in a Las Vegas car park to drop her allegations of the affair.

Mr Trump said her claims were "a total con job".