New York (CNN) Among those caught off guard Tuesday night by the public airing of Michael Cohen's secret recording of a conversation with his then-client Donald Trump: the federal prosecutors conducting the criminal investigation of Cohen.

Cohen's legal team didn't notify the US Attorney's Office for the Southern District of New York that it would be taking the tape to the media, according to multiple sources familiar with the matter.

On Tuesday evening, CNN's "Cuomo Prime Time" played the recording of the President and his then-personal lawyer discussing a possible payment regarding a former Playboy model who has alleged an affair with Trump. The tape disclosed Cohen telling Trump about plans to set up a shell company and finance the purchase of the rights to the former model's story from American Media Inc., publisher of the National Enquirer. Neither side disputes the subject of the conversation.

The decision by Cohen and his attorneys to make public a potential piece of evidence in federal prosecutors' investigation may have exasperated the government and potentially complicated Cohen's ability to obtain a cooperation deal, say people familiar with the US attorney's office. While Trump's lawyers had waived attorney-client privilege on the recording, giving Cohen the legal ability to make it public, his decision to do so could have consequences with respect to his relationship with prosecutors.

"They'd be very unhappy that Michael Cohen is putting forward some of the evidence to the media and commenting on it," said a former federal prosecutor from the office. "They don't like to be part of any sort of media circus," this person added, pointing to the cancellation of investigators' interview of porn actress Stormy Daniels in June, after the planned meeting was publicized.

According to an email exchange shared by her attorney, Michael Avenatti, at the time, Assistant US Attorney Nicolas Roos informed Avenatti that the meeting had been canceled because, "we have learned that you leaked to the press the fact and location of our meeting with your client."

"Typically, they would be really mad at him," another former prosecutor in the office said of Cohen, but allowed that prosecutors could be somewhat mollified by the fact that the release of the recording likely doesn't adversely affect their investigation, since the people and entities involved had already been made public.

A spokeswoman for the US attorney's office declined to comment.

JUST WATCHED Cohen lawyer: Only mobsters use cash Replay More Videos ... MUST WATCH Cohen lawyer: Only mobsters use cash 02:15

Should leak have been expected?

Even if prosecutors didn't anticipate Cohen's lawyer taking the tape to CNN, they hardly could have been caught off guard by his willingness to take such a step.

"If you're SDNY and you're watching this play out, you might say to yourself, 'Oh my God, what will we be getting ourselves into if this is our witness? We might need to think long and hard about what sort of offer we might make to him,'" said Michael Zeldin, a former assistant to Robert Mueller and a CNN legal analyst.

But Zeldin added, given that prosecutors are likely highly familiar with Cohen's history of aggressive tactics, it may simply solidify their understanding of his liabilities as a witness.

"I don't know that this further undermines the desirability of making a cooperation or plea agreement with Cohen," Zeldin said. "I think it's more confirming the fact that they have a witness who is going to be cross-examined on the question of his credibility."

As the first former federal prosecutor put it, "The way Cohen has behaved in general on Twitter and other things, they sort of know what they're getting with him, and if he had compelling evidence of crimes by Donald Trump, they could put a lot of their qualms aside about how he carries on."

Cohen's recent remarks about loyalty to his family have sparked speculation that he could seek a deal to cooperate with prosecutors. A friend of Cohen's on Wednesday expressed concern that the release of the recording would backfire on him in that effort.

"The feds aren't reaching out to him and (Michael Cohen) needs to make them want him," this person said.

One of Cohen's attorneys, Lanny Davis, had appeared Tuesday night on CNN to claim responsibility for providing the tape, saying the decision to go public was spurred by what he called falsehoods and insults lobbed at his client by the President and his allies.

"I completely understand why under ordinary circumstances prosecutors would not approve of what I did," Davis said Wednesday. "But I believe they would at least understand that I had an obligation to my client to correct the record on something harmful to him."

A person familiar with the matter said Cohen's other attorney, Guy Petrillo, a former chief of the criminal division at the US Attorney's Office for the Southern District of New York who is known for a by-the-book approach, was also on board with the decision to make the material public.

In past dealings with federal prosecutors at that office, Petrillo has favored a more discreet style and has privately criticized the office when he suspected the government improperly disclosed information about a case to reporters. During the office's 2014 investigation of a New York state anti-corruption commission, the Moreland Commission to Investigate Public Corruption, for example, Petrillo was angered with prosecutors after a newspaper story disclosed that his client in that probe was to be interviewed by federal investigators, according to people familiar with the matter.

Petrillo did not immediately respond to a request for comment.

The person familiar with the matter suggested Cohen's team had weighed the risks carefully. "Michael Cohen and his legal team were reluctant to respond out of respect for the process," the person said of the period after the existence of the tape became public.

But, this person added, referring to Trump's lawyers' assertions that the tape would prove damaging to Cohen, "false attacks have to be rebutted."