President Donald Trump's lawyer secretly obtained a temporary restraining order last week to prevent a pornographic film star from speaking out about her alleged affair with Trump, according to legal documents and interviews.

The order, issued by an arbitrator in California, pertained to the actress Stephanie Clifford, who had been paid $130,000 shortly before the 2016 election in what she calls a "hush agreement." In recent weeks, she had prepared to speak publicly about Trump, claiming his lawyer, Michael Cohen, had broken the agreement.

The details of the order emerged Wednesday after the White House's spokeswoman, Sarah Huckabee Sanders, said that Trump's lawyer had won an arbitration proceeding against Clifford, who goes by the name Stormy Daniels.

Sanders' statement put the White House in the middle of a story that Trump and his lawyer had been trying to keep quiet for well over a year. The turn of events created the spectacle of a sitting president using legal maneuvers to avoid further scrutiny of salacious accusations of an affair and a payoff involving the porn star.

Although Clifford said their relationship was consensual, the issue is particularly sensitive for Trump, whose campaign was dogged by allegations of groping and his boast of grabbing women's crotches.

Clifford filed a lawsuit in Los Angeles Superior Court on Tuesday asserting that the nondisclosure agreement that accompanied the $130,000 payment was void because Trump never signed it.

Sanders said that the president had denied having an affair with Clifford or making the payment himself.

"I've had conversations with the president about this," Sanders said. "This case has already been won in arbitration, and there was no knowledge of any payments from the president, and he has denied all these allegations."