President Donald Trump's longtime lawyer Michael Cohen will soon end a joint defense agreement with the president, ABC News reported Monday.

The former national security adviser Michael Flynn did the same just days before he reached an agreement with the special counsel Robert Mueller.

A former federal prosecutor told Business Insider the move "makes complete sense in the world where Michael Cohen flips."

President Donald Trump's longtime lawyer Michael Cohen will soon end a joint defense agreement with the president, ABC News reported Monday.

That would echo a move from the former national security adviser Michael Flynn just days before he reached an agreement with the special counsel Robert Mueller.

Many legal experts consider this the latest sign that Cohen, who is under federal criminal investigation, is readying to "flip" on Trump and cooperate with the government.

"Michael Cohen is preparing the way to flip on POTUS," said Mitchell Epner, an attorney at Rottenberg Lipman Rich who was previously an assistant US attorney for the District of New Jersey.

"Ending the joint defense agreement with POTUS and the Trump Organization makes no sense in the world where Michael Cohen is going to fight," he told Business Insider. "It makes complete sense in the world where Michael Cohen flips."

ABC News reported that once Cohen's new legal team, headlined by the attorney Guy Petrillo, takes over the case, the joint defense agreement that allows lawyers of both parties to share information and documents will come to an end.

Cohen hired Petrillo in June. Experts told Business Insider that Petrillo, a partner at Petrillo Klein & Boxer who has extensive experience in the Southern District of New York, was the kind of lawyer a person would choose if he or she were seeking to cut a deal with prosecutors.

"Once I understand what charges might be filed against me, if any at all, I will defer to my new counsel, Guy Petrillo, for guidance," Cohen told ABC News.

Michael Flynn. Jonathan Ernst/Reuters

In late November, Flynn notified Trump's legal team that he would end a similar agreement. Roughly a week later he pleaded guilty in the Mueller investigation to lying to the FBI and agreed to cooperate with the Russia inquiry.

Cohen, who worked for Trump over the past decade, is the focus of an investigation in the Southern District of New York into whether he violated campaign-finance laws or committed bank fraud, wire fraud, illegal lobbying, or other crimes. The FBI seized roughly 4 million documents from the lawyer in the April raids.

Trump has distanced himself from Cohen, suggesting that the investigation has far more to do with Cohen's business dealings than anything Cohen did for the president. Trump has also said he is not worried about Cohen giving the government anything damaging on him because he hasn't done anything wrong.

Cohen, meanwhile, split with the president in the ABC News interview, saying he would "put family and country first" when considering what he should do regarding that criminal investigation. When ABC's George Stephanopoulos pressed Cohen about his past vow to "take a bullet" for Trump, Cohen doubled down.

"To be crystal clear, my wife, my daughter, and my son and this country have my first loyalty," he said.