Image copyright Getty Images Image caption President Donald Trump denies the allegations made by Stormy Daniels

The controversy over an alleged affair between adult film star Stormy Daniels and US President Donald Trump has provided a deluge of troublesome headlines for the White House.

Ms Daniels is suing the president to get out of a so-called "hush agreement" before the 2016 election - the focus being a payment of $130,000 (£96,000) given to her by Mr Trump's lawyer, Michael Cohen, in exchange for her silence.

But Mr Trump and his legal team have made apparently contradictory statements about the payment, raising questions about how much the president knew about it.

So from denials to confessions - here's what the key players have said about the saga so far.

"He didn't seem worried about it. He was kind of arrogant"

Stormy Daniels, 2011

In a 2011 interview with In Touch Weekly, published in full in January, Ms Daniels spoke at length about meeting Mr Trump at a charity golf tournament in July 2006.

She alleged that the pair had sex in his hotel room at Lake Tahoe, a resort area between California and Nevada, and had an "ongoing" relationship after this encounter. Mr Trump denied the allegations.

"President Trump... vehemently denies any such occurrence"

Michael Cohen, 12 January 2018

The Wall Street Journal published an article earlier this year that claimed Mr Cohen had paid Ms Daniels $130,000 in October 2016 as part of an agreement that said she couldn't discuss the affair publicly.

Mr Cohen denied making the payment, and said all allegations had been "consistently denied by all parties" for years.

"An old and debunked story"

Michael Cohen, 17 January 2018

When the In Touch Weekly interview was published, Mr Cohen issued a statement denying that there had been an affair or a payment.

"This is not Breaking News... it's old news that wasn't true then and not true now," Mr Cohen told the New York Daily News. "All they did is recirculate an old and debunked story."

Image copyright AFP Image caption Michael Cohen is facing a prison sentence

"The payment was lawful"

Michael Cohen, 13 February 2018

In February, Mr Cohen announced for the first time that he had in fact paid Ms Daniels the money.

He said neither the Trump campaign nor the Trump Organization had known anything about the payment, which he had made from his own pocket. "Neither reimbursed me for the payment, either directly or indirectly," he told the New York Times.

"[It] was not a campaign contribution or a campaign expenditure by anyone."

"Stormy is going to tell her story"

Gina Rodriguez, Ms Daniels's manager, 14 February 2018

Ms Daniels' manager said her client was free to tell her story after the announcement by Mr Cohen.

Gina Rodriguez argued that Ms Daniels was no longer bound by the non-disclosure agreement. "Everything is off now, and Stormy is going to tell her story," she said.

"Yes"

Michael Avenatti, Ms Daniels' lawyer, 7 March 2018

Image copyright AFP Image caption Michael Avenatti, Ms Daniels' lawyer, says Americans "should be outraged"

Ms Daniels's lawyer was unequivocal when asked on NBC's Today programme whether Ms Daniels had had a sexual relationship with Mr Trump.

"There was no knowledge of any payments"

Sarah Sanders, White House press secretary, 7 March 2018

"I've had conversations with the president about this," Ms Sanders said in reference to the payment from Mr Cohen.

"There was no knowledge of any payments from the president, and he has denied all these allegations."

"Leave Trump alone. Forget the story"

Stormy Daniels, 25 March 2018

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

In a hotly anticipated interview with CBS News's 60 Minutes programme, Ms Daniels said she had been threatened to keep quiet about the alleged affair with Mr Trump.

She said a man had approached her in a Las Vegas car park in 2011, shortly after she agreed to the In Touch Weekly interview, and had told her to "leave Trump alone".

"No"

Donald Trump, 5 April 2018

In his first public comments about the alleged affair, Mr Trump denied knowing about the $130,000 payment.

Asked by a reporter why Mr Cohen had made it, he said: "Michael is my attorney, and you'll have to ask Michael Cohen."

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

"The president repaid it"

Rudy Giuliani, Mr Trump's legal aide, 3 May 2018

The former New York City mayor, who had only recently joined Mr Trump's legal team, told Fox News that the president had personally repaid Mr Cohen for the $130,000 payment.

"That money was not campaign money," he said. "They funnelled it through a law firm and the president repaid it."

Mr Giuliani said the repayment had been made "over a period of several months".

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

"Every American should be outraged"

Michael Avenatti, 3 May 2018

The lawyer for Ms Daniels responded to Mr Giuliani's revelation on Twitter. "This should never be acceptable in our America. We will not rest until justice is served," he said.

"Campaign contributions played no role"

Donald Trump, 3 May 2018

President Trump said the payment to Ms Daniels had been made and that Mr Cohen had been reimbursed through a "monthly retainer" as opposed to campaign funds.

"Money from the campaign, or campaign contributions, played no roll [sic] in this transaction," he tweeted.

He branded Ms Daniels' claims of an affair "false and extortionist".

"He will get his facts straight"

Donald Trump, 4 May 2018

Speaking at the White House, Mr Trump cast doubt on Mr Giuliani's account by explaining that his lawyer was new to the job and not "familiar with everything".

"He started yesterday," the president told reporters. "He'll get his facts straight. He's a great guy."

Media playback is unsupported on your device Media caption Trump on Giuliani: 'He'll get his facts straight'

"Clarify"

Rudy Giuliani, Mr Trump's legal aide, 4 May 2018

In Mr Giuliani's subsequent statement "intended to clarify" his remarks, he said: "There is no campaign violation.

"The payment was made to resolve a personal and false allegation in order to protect the president's family. It would have been done in any event, whether he was a candidate or not."

He added: "My references to timing were not describing my understanding of the president's knowledge, but instead, my understanding of these matters."

"The payment made by Mr Cohen is required to be reported"

David Apol, acting director of the Office of Government Ethics, 16 May 2018

Donald Trump officially disclosed his reimbursement to his lawyer.

The Office of Government Ethics stated that he ought to have revealed the payment in his previous financial disclosure.

"A woman who sells her body for sexual exploitation, I don't respect"

Rudy Giuliani, Mr Trump's legal aide, 7 June 2018

Mr Giuliani said Ms Daniels did not deserve "respect" due to her sex work.

Michael Avenatti, the porn star's lawyer, responded by calling Mr Giuliani an "absolute pig".

"So, what do we got to pay for this? One-fifty?"

Donald Trump, speaking in secret recording from September 2016, broadcast on 25 July 2018

A recording of a conversation in which Mr Trump and Mr Cohen discuss a payoff over an alleged affair with another woman, former Playboy model Karen McDougal, was broadcast by CNN.

The audiotape was recorded in September 2016, two months before the election. The affair allegedly dates to 2006.

Rudy Giuliani said no money had been paid, and the tape did not show evidence of any crime.

Speculation mounted over what Mr Cohen, now under investigation for breaking electoral finance rules, might further reveal.

"I participated in this conduct with the purpose of influencing the election"

Michael Cohen, pleading guilty to electoral finance violations, 21 August 2018

Cohen told a court in New York that he had in fact paid hush money to two women, believed to be Ms Daniels and Ms McDougal, and had done so "at the direction" of Mr Trump.

"Later on I knew"

Donald Trump, speaking in interview, 23 August July 2018

Mr Trump admitted that the hush money paid by Cohen was his own but argued that the law had not been broken because it had not come out of his campaign funds.

He said again that he had not known about the payments until "later on".