Adult-film star Stormy Daniels has lost a court motion for US President Donald Trump to give testimony about her claim that they had a relationship.
A judge in California dismissed the action, calling it premature as a formal response from Mr Trump's team had not been received.
Ms Daniels' lawyer wanted sworn testimony from the president about an alleged "hush" agreement.
The actress says she had sex with Mr Trump in 2006. He denies it.
Ms Daniels was seeking a deposition - an out-of-court interview with a witness - which can serve as evidence in a trial.
Her lawyer, Michael Avenatti, who also wants Trump's lawyer to testify, said he planned to re-file the motion at the earliest opportunity.
He tweeted that he was confident that the court would "ultimately agree with our requests for discovery and a trial".
The president's representatives made no immediate comment.
Ms Daniels, whose real name is Stephanie Clifford, says she signed an agreement to keep quiet about her claims in exchange for $130,000 (£91,000) in October 2016, days before the presidential election.
Her deposition request was filed in a court in the Central District of California on Wednesday.
Two days earlier, Ms Daniels had filed a lawsuit against the president, alleging that the non-disclosure agreement was invalid because Mr Trump did not sign it.
She also sued Mr Trump's lawyer, arguing he had defamed her by suggesting she was a liar.
Mr Trump's lawyer, Michael Cohen, admits to making the payment privately, but denied that Mr Trump was a party to the transaction.
Last Sunday, an interview with Ms Daniels was broadcast on CBS's 60 Minutes programme. More than 22 million Americans tuned in.
While Mr Trump has denied her claims, his lawyers are seeking $20m in damages from Ms Daniels, arguing she broke the non-disclosure deal.