A payment meant to silence an adult film actress in the days before Donald Trump's stunning election victory in 2016 may now result in his being the first US former president ever to be indicted.

How did it come to this?

How is Trump defending himself, and what risks does he face?

Here are some key elements of the case:

Hush money payment

At a key point in the 2016 presidential campaign, intense negotiations were underway behind the scenes to prevent the leak of embarrassing, and potentially crippling, allegations against the Republican candidate.

In August, The National Enquirer, an American tabloid whose owner is a Trump ally, paid $150,000 to a model, Karen McDougal, for the rights to her story about a relationship she claimed to have had with the billionaire.

The objective was to prevent any word of her allegations from getting out - a technique known as "catch and kill" in the United States, where confidentiality clauses are common.

Meantime, Stephanie Clifford - a pornographic film actress who goes by the name of Stormy Daniels - was also trying to cash in on a relationship she says she had with Trump in 2006, a year after he married his current wife, Melania.

The tabloid put her in touch with Michael Cohen, one of Trump's personal lawyers.

Late in the 2016 campaign, Cohen, whose fierce loyalty to Trump had earned him the nickname of "the Pitbull," arranged a payment of $130,000 to Ms Daniels in exchange for her pledge of confidentiality.

The payment was revealed by the Wall Street Journal in January 2018.

Cohen and Mr Trump dismissed the report, and the then-president repeatedly denied having had a relationship with Mr Daniels.

Adult film actress Stormy Daniels

Undeclared campaign gift?

Cohen, who was already entangled in the inquiry into possible Russian interference in the 2016 election, found himself under steadily increasing pressure.

He ultimately opted to collaborate with prosecutors and he pleaded guilty in August 2018 before a federal court in Manhattan to charges of tax and bank fraud, but also charges of violating federal campaign financing laws.

A federal indictment accused Cohen of making the payments to Ms Daniels to buy her silence in order to influence the 2016 presidential election.

The Trump Organization had reimbursed Cohen for his payment to Ms Daniels, which prosecutors said amounted to an undeclared campaign gift to Trump, in violation of election financing laws.

In December 2018, Cohen - who has turned virulently against Mr Trump and said he was acting on his orders - was sentenced to three years in prison.

Possible charges

Columbia University law professor John Coffee told AFP that there is nothing criminal in the payment itself.

What is illegal, he added, is the falsification of a company's commercial documents.

The Trump Organization is a company, he added, and the payments to Cohen were declared as simply being reimbursements for legal fees - a falsification.

If the payment to Ms Daniels is the only charge against Mr Trump, it would be classed as a misdemeanor, said Mr Coffee, a specialist in criminal justice and white-collar crime.

But if prosecutors can convince a jury that the falsification took place in order to hide another crime - such as undeclared campaign contribution - it can rise to a felony, punishable by up to four years in prison.

But Mr Coffee said this argument would not necessarily be an easy one to make in court.

Donald Trump's former lawyer and fixer Michael Cohen after testifying before a grand jury in New York

'Witch hunt'

In each of the several state and federal investigations targeting him, Mr Trump has blamed a political "witch hunt" by Democratic prosecutors.

In the current case, his lawyers have depicted Mr Trump as the victim of "extortion" by Ms Daniels.

Mr Trump's lawyers would also be certain to attack the credibility of Cohen, a key witness for the prosecution and now a sworn enemy of Trump.

The former lawyer - he has been disbarred - Cohen has also pleaded guilty to lying to the US Congress about a Moscow real estate deal Mr Trump's company was pursuing in 2016.

Risks for Trump

Conviction in the Ms Daniels case would not prevent Trump from continuing his campaign to return to the White House, Mr Coffee said, but it could prove politically damaging.

Just how damaging, the Columbia professor would not speculate.

He said Mr Trump's lawyers were certain to do everything possible to delay a trial as long as possible - while his rivals for the Republican nomination would surely like to see it take place much sooner.