Jessica Drake, right, show in October 2016 with her attorney, Gloria Allred, said Stormy Daniels told her years ago about being threatened in a parking lot by an unidentified man.

A porn star said adult-film actress Stormy Daniels told her about being threatened to keep quiet about an alleged affair with Donald Trump, an account that could play a role in a civil case Daniels is pursuing against Trump and his personal lawyer, Michael Cohen.

Actress Jessica Drake said in an interview that Daniels told her in 2011 about being threatened by a man in a Las Vegas parking lot shortly after she sought to sell her story about Trump to a tabloid magazine.

Drake said Daniels reminded her about the encounter in October 2016, the day after Drake went public with her own allegation that Trump improperly touched her.

“She was warning me, I needed to be very careful,” Drake said in a recent interview.

“Don’t be alone,” Daniels told her, as Drake recalled.

Trump has denied having an affair with Daniels, whose real name is Stephanie Clifford, and dismissed the sketch she released of the man she said threatened her as “a total con job.”

Cohen has acknowledged arranging a secret $130,000 payment to Daniels days before the 2016 election as part of a deal in which she agreed not to discuss the alleged 2006 sexual encounter.

The president has said he did not know about the payment.

Cohen’s attorney, Stephen M. Ryan, declined to comment on Drake’s account.

Daniels’s attorney, Michael Avenatti, said Drake’s comments “add credibility to what the vast majority of people already know — Stormy Daniels is telling the truth and is an honest person.”

Daniels is seeking to nullify the 2016 hush agreement, arguing in a lawsuit that the deal is not binding because Trump did not sign it.

The suit was stayed last month for 90 days by a federal judge in response to a request from ­Cohen, who said he would plead the Fifth Amendment in any deposition in the case because he is separately under criminal investigation in New York.

In a motion filed Thursday, Avenatti argued that in light of recent comments the president has made about the episode, the portion of the case against Trump should proceed. A hearing on his motion is set for June 21.

If the case moves forward, Drake’s account could help bolster Daniels’s suit, legal experts said.

“Assuming she takes the stand, it’s a tie breaker in a he-said, she-said type of dispute,” said Joseph Cammarata, a trial lawyer who represented Paula Jones in a sexual harassment lawsuit against President Bill Clinton. “A witness that is able to testify about being told at or near the time of the incident is a game-changer.”

Gloria Allred, an attorney for Drake, told The Washington Post that Drake is prepared to give her account in court to corroborate Daniels’s story.

Drake told The Post that while she and Daniels have known each other for about 15 years, they are not close.

“I wouldn’t say we are friends now,” Drake said.

She said she decided to speak up and back Daniels “because women need to be heard and believed.”

Both actresses claim their personal encounters with Trump occurred during a 2006 Lake Tahoe golf event that they attended to promote Wicked Pictures, a studio that produces adult films.

Drake said that during the event, she, Daniels and a third woman were escorted by a Trump bodyguard to a penthouse suite at Harrah’s. There, she said, the pajama-clad future president pressed uninvited kisses on their lips and hugged them.

Trump has denied inappropriately touching Drake and other women who have made similar allegations.

Drake said that after she returned to her own room, she received calls from a bodyguard and then Trump himself, inviting her to return to his suite. She said Trump appeared frustrated when she declined, suggesting she could use his plane if she would stay on in Tahoe and asking what else she wanted.

Trump, she said, “wouldn’t take no for an answer.”

Tom Hamburger contributed to this report.