Image copyright Getty Images

President Donald Trump has denied money used to buy a porn star's silence came from election campaign funds.

He admitted, in a series of tweets, that lawyer Michael Cohen had paid off Stormy Daniels during the campaign and that he was reimbursed.

It was the first time the president has referred directly to the payment, although he remains adamant there was no affair with Ms Daniels.

Use of campaign funds would be a violation of federal law.

Earlier, his legal aide Rudy Giuliani had said the money was Mr Trump's personal cash.

Should Trump be worried about Stormy Daniels?

What has Mr Trump said?

The president fired off three tweets on Thursday morning, focusing on the reimbursement and a non-disclosure agreement (NDA) with Daniels.

Mr Trump's argument appears to be that the NDA was a typical agreement entered into by celebrities and therefore not an election-related matter.

This could be crucial in determining whether the $130,000 (£95,650) paid to Ms Daniels was legal.

The actress says she had an affair with Mr Trump in 2006 and she slept with him once.

In a particularly feisty White House daily news conference on Thursday, press secretary Sarah Sanders was asked when she became aware that Mr Trump had repaid Mr Cohen the money.

"The first awareness I had was during the [Giuliani] interview last night," she said.

What have the parties previously said?

Media playback is unsupported on your device Media caption On 5 April Donald Trump said "I don't know" about a payment to Stormy Daniels

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."

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 he 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 alleged personal repayments by Mr Trump is unclear.

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

Who is lying here?

By Anthony Zurcher, senior North America correspondent

Donald Trump's April assertion that he had no idea where Michael Cohen found the money to secure Stormy Daniels' silence seems, to borrow a phrase from Nixon administration press secretary Ron Ziegler, "no longer operative".

White House Press Secretary Sarah Huckabee Sanders stated in March that the president had "no knowledge of any payments". Now she's saying she can't comment on the situation.

Michael Cohen - before he cited the Fifth Amendment in court to avoid self-incriminating testimony - insisted that he made the Daniels payment out of his own pocket. Former New York Mayor Rudy Giuliani, a new arrival on the president's personal legal team, says Mr Trump reimbursed Mr Cohen for the payment over the course of 2017 and was tasked with handling "things like this".

Someone has lied or is lying to protect Donald Trump. The questions are who - and why.

Michael Avenatti, Daniels' lawyer, says his client has evidence that will prove the veracity of their claims. Mr Trump, in his tweets, promises a lawsuit to enforce Daniels' silence about what he calls "false and extortionist accusations".

This White House storm shows no signs of ending anytime soon.

Media playback is unsupported on your device Media caption White House weighs in on Stormy Daniels

Why exactly is campaign finance an issue?

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 key question may be whether the money was used to prevent Mr Trump's reputation being harmed during the campaign, and therefore be deemed as related to the election.

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.

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 that the personal nature of the repayment makes it legal.

If the $130,000 were deemed to have been a loan to Mr Cohen, the president would only have had to disclose the repayment to the Federal Election Commission if it were an election-related expense.

There is no mention of any debt to Mr Cohen on Mr Trump's personal financial disclosure form from June 2017.

Does what Mr Trump say square with Mr Giuliani?

Former New York City mayor Rudy Giuliani recently joined Mr Trump's legal team and had earlier been interviewed by Sean Hannity on Fox News, surprising many with his comments.

He was the first to say Mr Trump repaid the money.

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.

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

Mr Trump's tweet also speaks of a monthly retainer, although it is unclear about the timing of its payment to Mr Cohen.

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 Mr Trump's statement that repayments were made over several months.

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

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 says Mr Trump was not a party to the transaction.

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.

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 had said her claims were "a total con job".