President Donald Trump and his longtime attorney Michael Cohen both lost a court challenge related to the FBI’s seizure of Cohen’s documents they both claim are protected by attorney-client privilege.

Cohen had asked a federal judge for a temporary restraining order to stop federal prosecutors in Manhattan from viewing the information seized by the FBI until an independent third party, called a “special master,” be allowed to sort out what is protected by attorney-client privilege.

Similarly, Trump’s own legal representation in this case, Joanna Hendon, filed a letter on Sunday night asking the judge to give Cohen’s team first-access to the material.

U.S. District Court Judge Kimba Wood denied the requests and ruled that prosecutors will get first access to the information, followed by Cohen’s defense team ten days later. Wood noted that she has not yet decided whether she will appoint a special master in the case at all.

“It’s not that you’re not good people,” Wood told Cohen’s attorneys on Monday afternoon, near the end of the two-hour proceeding . “It’s that you’ve miscited the law.”

Wood told both sides to review the documents quickly and to prepare “proposals for how we can move fast” on the case going forward.

The materials seized by FBI agents from Cohen’s home, office, safety deposit box, and hotel room includes “documents relating to communications with the president of the United States covered by the attorney-client privilege,” Cohen’s lawyer, Todd Harrison, said in Monday’s letter to Wood.

Prosecutors have said that they went to extreme lengths to avoid violating Cohen’s (and the president’s) attorney-client privilege: they plan to have a “taint team” of uninvolved prosecutors sort the materials before turning the information over to investigators.

“ I have faith in the Southern District U.S. Attorney’s office that their integrity is unimpeachable,” Judge Wood said. “ I think that a taint team is a viable option.”

Prosecutors reportedly sought information about Cohen’s role in facilitating hush-money payments to Trump’s alleged mistress, porn star Stormy Daniels, and his potential role in facilitating a payout to ex-Playmate Karen McDougal in the run-up to the 2016 election. Both women claim they had affairs with Trump and have sued to be released from their NDAs. The raids were “the result of a months-long investigation into Cohen” and his “own business dealings,” prosecutors said in a Friday filing.

Daniels arrived in court on Monday wearing a lavender skirt-suit and black heels as she flew by a chorus of camera shutters. Her media-savvy attorney, Michael Avenatti, told The Washington Post last week that he and his client would be at the hearing to make sure that “the integrity of the documents, whatever was seized, is maintained.”

Daniels sat silently in the right-hand corner of the room while reporters passed their business cards to Avenatti.

Over the past week, the legal battle between politicians, porn stars and Playboy models has become increasingly complicated—and mired in legalese.

“If the government can obtain a search warrant for particular items but then seize and review everything in an attorney’s office, the protections of the Fourth Amendment are meaningless,” Harrison, Cohen’s lawyer, wrote in Monday’s letter. “We respectfully submit that the circumstances do not get more special than the unique circumstances presented by this case.”

“The balance of the equities should be with the American citizen whose stuff was taken,” Harrison said in court.

“There’s no question that you're going to get a set of material,” Judge Wood told Harrison, “but you’re not going to take away what the government has.”

On Friday, Judge Wood asked Cohen’s attorneys how they could argue that “thousands” of seized documents could be privileged while they refused to provide a list of Cohen’s clients to the court.

Those clients, it has now been revealed, include Trump, Republican fundraiser Elliot Broidy, and Fox News host Sean Hannity, who had asked not to be named. Cohen’s team claimed in the Monday filing that Hannity’s identity was protected under attorney-client privilege, but the U.S. Attorney’s office disagreed, alleging that Cohen’s team was simply employing a delaying tactic.

“Cohen has more attorneys than he has clients,” Assistant U.S. Attorney Thomas McKay quipped.

Cohen attorney Steve Ryan argued that the third client—Hannity—is a “publicly prominent individual,” who did not want his name released.

“I’m simply trying to protect the privacy of that individual,” he added.

After much discussion, Wood ruled that the name must be publicly disclosed immediately.

“The client’s name is Sean Hannity,” replied Todd Harrison, Cohen’s attorney. The room erupted in laughter.

Separately, Hannity said he never “retained” Cohen as representation in any legal matters involving third parties but has “sought legal advice from Michael” about “real estate” in the past.

McKay emphasized on Monday that “there’s nothing improper about the way the search warrants were executed in this case.”

Officials took up to 10 “physical boxes” of documents, McKay said, noting that the “real volume” is made up of the seized electronic files.

“Cohen’s signature line in his email box used to say special counsel to the Trump Organization,” said McKay. “Now it says personal attorney to the president.”

For his part, Cohen has given few public statements about the ordeal, with the exception of this comment last week: “I just want my stuff back.”

“Candidly, this man’s life has been turned upside down in the last week,” Cohen’s attorney said on Monday , adding a Trumpian flourish: “I believe the Russia case with respect to my client is a complete dry hole.”