President Trump’s personal attorney Michael D. Cohen sometimes taped conversations with associates, according to three people familiar with his practice, and allies of the president are worried that the recordings were seized by federal investigators in a raid of Cohen’s office and residences this week.

Cohen, who served for a decade as a lawyer at the Trump Organization and is a close confidant of Trump’s, was known to store the conversations using digital files and then replay them for colleagues, according to people who have interacted with him.

“We heard he had some proclivity to make tapes,” said one Trump adviser, who spoke on the condition of anonymity because of the ongoing investigation. “Now we are wondering, who did he tape? Did he store those someplace where they were actually seized? . . . Did they find his recordings?”

Cohen did not respond to requests for comment. Stephen Ryan, an attorney for Cohen, declined to comment. A White House spokeswoman referred a request for comment to Cohen and his attorney.

On Monday, FBI agents seized Cohen’s computers and phones as they executed a search warrant that sought, among other records, all communications between the lawyer and Trump and campaign aides about “potential sources of negative publicity” in the lead-up to the 2016 election, The Washington Post reported.

Investigators were also looking for any records related to adult-film star Stormy Daniels and ex-Playboy model Karen McDougal, who both received payments after alleged affairs with Trump.

It is unknown whether Cohen taped conversations between himself and Trump. But two people familiar with Cohen’s practices said he recorded both business and political conversations. One associate said Trump knew of Cohen’s practice because the attorney would often play him recordings Cohen had made of his conversations with other top Trump advisers.

“It was his standard practice to do it,” this person said.

Legal experts said Cohen’s taped conversations would be viewed by prosecutors as highly valuable.

“If you are looking for evidence, you can’t do any better than people talking on tape,” said Nick Akerman, a former Watergate prosecutor.

Such recordings “would be considered a gold mine,” said Stephen Gillers, a law professor at New York University who specializes in legal ethics.

“The significance is 9.5 to 10 on a 10-point scale,” he added, noting that investigators know “that when people speak on the phone, they are not guarded. They don’t imagine that the conversation will surface.”

Federal investigators would not automatically get access to any tapes that might have been seized in the raids. First, the recordings would be reviewed by a separate Justice Department team and possibly by a federal judge. The review is designed to protect lawyer-client privilege and to be sure that the conversations turned over are within the terms of the search warrant, legal experts said.

They noted that the privilege accorded to attorney-client communications does not apply if the conversation was conducted to further commission of a crime or fraud.

Cohen wanted his business calls on tape so he could use them later as leverage, one person said. He frequently noted that under New York law, only one party had to consent to the taping of a conversation, this person added.

During the 2016 race, Cohen — who did not have a formal role on the campaign — had a reputation among campaign staff as someone to avoid, in part because he was believed to be secretly taping conversations.

In one instance, Cohen played a recording of a conversation he had with someone else to a Trump campaign official to demonstrate that he was in a position to challenge that person’s veracity if necessary, an associate recalled.

Cohen indicated that he had something to use against the person he had taped, the associate said.

One outside Trump adviser said Cohen may have begun recording his conversations in an attempt to emulate his boss, who has long boasted — often with no evidence — about secretly taping private conversations.

In May, for instance, a report appeared in the New York Times detailing fired FBI director James B. Comey’s account of a one-on-one dinner he had with the president, during which he said Trump asked him to pledge his loyalty to the president and he declined. Shortly after, Trump took to Twitter to cast doubt on Comey’s version of events, seeming to imply that he had secretly recorded their encounter.

“James Comey better hope that there are no ‘tapes’ of our conversations before he starts leaking to the press!” Trump wrote.

At the time, it was unclear whether Trump truly possessed tapes of his conversation with Comey or was simply trying to intimidate him. And ultimately, just over a month later, Trump cleared up the mystery by admitting in a duo of tweets that he had not, in fact, recorded Comey.

“With all of the recently reported electronic surveillance, intercepts, unmasking and illegal leaking of information, I have no idea whether there are ‘tapes’ or recordings of my conversations with James Comey, but I did not make, and do not have, any such recordings,” he wrote.

Tim O’Brien, a Trump biographer and executive editor of Bloomberg View, wrote a column in the wake of Trump’s taping claim saying that Comey probably had little reason to worry. In the piece, O’Brien recounted that Trump frequently made a similar boast to him.

“Back in the early 2000s, Trump used to tell me all the time that he was recording me when I covered him as reporter for the New York Times,” O’Brien wrote. “He also said the same thing when I was writing a biography of him, ‘Trump Nation.’ I never thought he was, but who could be sure?”

But after Trump sued him for libel shortly after his biography came out, O’Brien’s lawyers deposed Trump in December 2007 — during which Trump admitted he had not, in fact, clandestinely taped O’Brien.

“I’m not equipped to tape-record,” Trump said in the deposition. “I may have said it once or twice to him just to — on the telephone, because everything I said to him he’d write incorrectly; so just to try and keep it honest.”