NEW YORK — A legal fight over what should happen to records the FBI seized from President Trump’s personal attorney took a stunning twist Monday when the lawyer, Michael Cohen, was forced to reveal a secret — he had also done legal work for Fox News host Sean Hannity.
The disclosure came as a New York judge disappointed a lawyer for Trump by letting prosecutors proceed with the cataloguing of evidence, including multiple electronic devices that were seized in raids, while a system is set up to ensure that records protected by attorney-client privilege aren’t disclosed to investigators.
Hannity played down the relationship, saying he occasionally asked Cohen legal questions but never paid him. But the connection between the two men inserted another high-profile, polarizing Trump ally into the drama surrounding the criminal investigation of the president’s longtime lawyer.
Lawyers for Cohen and prosecutors both had reason to claim success after three hours of arguments before US District Judge Kimba Wood, who said she may appoint a special master, a neutral lawyer, to help decide which materials should stay confidential.
Wood denied a request by Trump’s lawyer, Joanna Hendon, that the president and Cohen get the first crack at designating which documents should be off-limits to investigators.
Hannity’s name emerged after the judge pressed Cohen to divulge the names of the clients he’s worked with since the 2016 election, whose privileged communications might be contained within his files.
Cohen’s legal team said he had just three clients in 2017 and 2018.
Lawyers for Cohen and Trump have argued that the seizure could lead to violations of attorney-client privilege. Cohen’s attorneys have asked to review the documents, or have a court-appointed special master do so, to determine what material is protected by attorney-client privilege.
The judge did not make a decision but said she was considering appointing the special master — not because of legal precedent but in the interest of avoiding the appearance of bias in the politically charged case. Wood said she wanted more information before ruling.
‘‘I have faith in the Southern District US Attorney’s Office that their integrity is unimpeachable,’’ she said.
But she added that to address concerns about ‘‘fairness’’ raised by Trump and Cohen’s attorneys, ‘‘a special master might have a role here. Maybe not the complete role, but some role.’’
Assistant US Attorney Thomas McKay urged the judge to reject the requests from the president and Cohen.
‘‘Just because he has a powerful client doesn’t mean he should get special treatment,’’ said McKay, who warned that if the judge gives them an inch, ‘‘they’re going to take a mile.’’
Hendon told the judge that the president ‘‘is objecting to anyone other than himself making the initial determination of privilege,’’ urging caution over haste.
‘‘This is an extraordinary case,’’ she said. ‘‘There’s tremendous risk that privileged material could not be recognized as such.’’
It is unusual but not unprecedented for criminal investigators to seize documents from a lawyer, and there is a policy in place designed to shield information covered by attorney-client privilege.
That procedure involves having a ‘‘taint team’’ — also called a ‘‘filter team’’ — of prosecutors outside the investigation review material and separate what is covered by the privilege.
A lawyer’s communications with a client are not covered by the privilege if they did not involve legal advice or were used to further a crime or fraud.
Under the procedure, the taint team would turn over to the case investigators all the material that is relevant and not covered by attorney-client privilege.
Wood said Monday that ‘‘a taint team is a viable option,’’ but it was unclear how she would decide to assess the possibly privileged material.
The judge asked the government to make digital copies of all the material it had seized and share those files with Cohen’s lawyers, who would in turn share relevant information with lawyers for Trump and the Trump Organization.
The goal, Wood said, would be to have a sense of how much work would be required of a special master and, therefore, how long that process might take.
Over the Trump and Cohen teams’ objections, Wood allowed the government’s filter team to run mechanical searches on the material collected to determine an estimate of how many documents it thought might be privileged.
The masses of reporters outside and inside the courthouse in Lower Manhattan underscored the importance of the case — and the strange circumstance of a Justice Department lawyer squaring off in court against a lawyer for the president to argue about potential evidence in a criminal probe of the president’s private attorney.
Cohen’s lawyers acknowledged that he has had only about three legal clients in the past year and a half — Trump, former Republican National Committee deputy finance chairman Elliot Broidy, and a mystery third client whom Cohen initially didn’t want to name.
Under pressure from the judge, Cohen’s legal team eventually revealed that Hannity was the third client — drawing gasps and some chuckles in the courtroom.
The firebrand commentator is a close informal adviser to Trump, who has urged the public to watch Hannity’s show, during which he regularly attacks the special counsel investigation into Russia’s interference in the 2016 campaign.
Last week, Hannity criticized the raids on Cohen’s office and residences as ‘‘an unprecedented abuse of power,’’ never mentioning his relationship with the Trump lawyer.
Hannity said Monday that he never paid him to be his attorney.
‘‘Michael Cohen has never represented me in any matter,’’ the conservative commentator wrote on Twitter. ‘‘I never retained him, received an invoice, or paid legal fees. I have occasionally had brief discussions with him about legal questions about which I wanted his input and perspective.
‘‘I assumed those conversations were confidential, but to be absolutely clear they never involved any matter between me and a third party,’’ Hannity added.
Cohen, who is under criminal investigation for possible bank fraud and campaign finance violations, has come under scrutiny by federal prosecutors for his efforts to tamp down negative stories about Trump.
In late 2016, he paid adult-film actress Stormy Daniels $130,000 in exchange for her agreement not to discuss an alleged sexual encounter with Trump.
Last week, it was revealed that Cohen had helped Broidy negotiate a $1.6 million settlement with a former Playboy model who got pregnant after they had an affair.
Daniels attended Monday’s hearing, telling reporters afterward that ‘‘for years, Mr. Cohen has acted like he is above the law.’’
‘‘He has never thought that the little man — or especially, women, and even more, women like me — matter,’’ she said. ‘‘That ends now. My attorney and I are committed to making sure that everyone finds out the truth.’’
A letter from Cohen lawyer Todd Harrison filed Monday said that during last week’s raids, agents seized ‘‘more than a dozen electronic devices and other items that include documents and data regarding topics and issues that have nothing to do with’’ the material sought in the search warrant.
The letter says that from 1996 to 2006, Cohen had hundreds of clients, adding that he did not know if any material from those clients was in the seized files.
From 2007 to 2017, Cohen worked as a lawyer for Trump and the Trump Organization.
The letter said that in 2017 and 2018, Cohen had ‘‘at least 10 clients,’’ but seven of those were business consulting clients whose work did not involve legal advice.