Porn star Stormy Daniels turned a hotly anticipated court appearance by President Trump’s personal lawyer Michael Cohen into a three-ring circus on Monday, creating a media frenzy when she rolled up to the hallowed hall of justice in black stiletto heels.

Meanwhile, inside the Manhattan federal courthouse, the Cohen case took another twist when a mystery client of his was revealed to be Fox News Channel personality Sean Hannity.

Cohen had been ordered to appear in court after his own lawyers last week struggled to explain why records obtained in government raids on his office, home and hotel room should be shielded by attorney-client privilege — repeatedly failing to name any of his clients apart from Trump.

But Daniels, best known before her claim of sleeping with Trump for such XXX movies as “Big Busted Goddesses of Las Vegas” and “The Witches of Breastwick,” easily upstaged the man-of-the-hour as she strutted through a throng of photographers and news cameras outside the Pearl Street courthouse.

“It’s a Stormy day,” her lawyer, Michael Avenatti, cracked to the mass of reporters.

She played no part in the hearing itself, so her role in the day’s story was her presence itself.

In court, attention turned to Hannity when the judge ordered Cohen’s attorneys to reveal the third of Cohen’s three clients whose privileged information they claim was seized by the feds.

“The client’s name is Sean Hannity,” lawyer Stephen Ryan finally told the judge — drawing gasps of surprise from onlookers and a hubbub of activity from the press.

Cohen initially attempted to keep the conservative talk-show host’s identity confidential, saying the staunch Trump supporter asked not to be named as a client in public.

“I’m simply trying to protect the privacy of that individual,” said Ryan, who described Hannity as a “publicly prominent individual.”

But Judge Kimba Wood ruled: “I understand that he doesn’t want his name out there but that’s not enough under the law.”

Hannity quickly jumped on Twitter to deny he was ever an actual client of Cohen’s.

“Michael Cohen has never represented me in any matter. I never retained him, received an invoice, or paid legal fees,” Hannity wrote.

“I have occasionally had brief discussions with him about legal questions about which I wanted his input and perspective,” he added in another tweet.

“I assumed those conversations were confidential, but to be absolutely clear they never involved any matter between me and a third-party.”

On his daily afternoon radio show, Hannity — who has repeatedly railed against the Cohen investigation but never disclosed any connection to it — added that he’s known Cohen “a very long time.”

“Michael would very generously give me his time,” Hannity said. “How did this blow up to be such a big deal?”

Last week, it was revealed that Cohen arranged a $1.6 million payment on behalf of Republican National Committee fundraiser Elliott Broidy to a former Playboy model whom Broidy had gotten pregnant. Broidy is the second of Cohen’s three clients.

Broidy resigned from his post in the wake of the news.

In their raids, FBI agents seized numerous devices and documents, including papers tied to the $130,000 Cohen paid Daniels days before the election to hush up about an alleged affair with Trump in 2006.

The raids prompted Cohen to seek a court-ordered halt to the government’s review of the documents.

Cohen’s lawyers are asking to oversee a review of the records or for a court-appointed “special master” to take charge — while Trump’s lawyers said the president should be the one who gets first say over which files are privileged.

“He is objecting to anyone but himself making the initial determination of privilege,” another Trump lawyer, Joanna Hendon, told the court.

But Wood denied Trump a first look at the records, dryly asking Hendon, “How much time can your client devote to this matter?”

She left the door open to a special master, however, saying it could provide “the perception of fairness.”

After the hearing, Daniels again stole the spotlight, holding a brief press conference to blast Cohen for acting “like he is above the law.”

“He plays by a different set of rules, — or should we say no rules at all?” said Daniels, fresh off cashing in from the controversy at a strip club near Trump’ s Mar-a-Lago club in Florida.

“My attorney and I are committed to making sure that everyone finds out the truth and the facts of what happened, and I give my word that we will not rest until that happens.”

Cohen and his lawyer declined to comment.