President Trump on Wednesday slammed his former longtime personal attorney Michael Cohen for striking a plea deal with federal prosecutors admitting to campaign finance violations and implicating the president.

“If anyone is looking for a good lawyer, I would strongly suggest that you don’t retain the services of Michael Cohen!” Trump tweeted Wednesday.

At the same time, the president tweeted in support of ex-campaign chairman Paul Manafort, who was found guilty on eight tax and bank fraud counts just as the Cohen plea deal was being finalized. Amid speculation of a possible pardon for Manafort, Trump praised him for not striking a deal with prosecutors -- and accused Cohen of making up stories to get one.

"I feel very badly for Paul Manafort and his wonderful family. 'Justice' took a 12 year old tax case, among other things, applied tremendous pressure on him and, unlike Michael Cohen, he refused to 'break' - make up stories in order to get a 'deal.' Such respect for a brave man!" Trump tweeted.

Cohen, once seen as one of Trump’s most loyal advisers, admitted Tuesday to violating federal campaign finance laws by arranging hush money payments to adult film star Stormy Daniels and former Playboy model Karen McDougal “at the direction” of then-candidate Trump during the 2016 race.

In entering the plea, Cohen did not specifically name the two women or even Trump, recounting instead that he worked with an “unnamed candidate.” But the amounts and the dates all lined up with the payments made to Daniels and McDougal.

MICHAEL COHEN ADMITS VIOLATING CAMPAIGN FINANCE LAWS IN PLEA DEAL

In total, Cohen pleaded guilty to five counts of tax evasion, one count of making false statements to a financial institution, one count of willfully causing an unlawful corporate contribution, and one count of making an excessive campaign contribution.

Cohen could have received up to 65 years in prison if convicted of all charges. However, as part of his plea deal, Cohen agreed not to challenge any sentence between 46 and 63 months. The deal does not involve a cooperation agreement with federal prosecutors.

Cohen is set to be sentenced Dec. 12.

Trump’s lawyers are insisting the president did nothing wrong.

“There is no allegation of any wrongdoing against the president in the government’s charges against Mr. Cohen,” Trump attorney Rudy Giuliani said. “It is clear that, as the prosecutor noted, Mr. Cohen’s actions reflect a pattern of lies and dishonesty over a significant period of time.”

But Cohen’s attorney, Lanny Davis, suggested they are coming after Trump.

"Today he stood up and testified under oath that Donald Trump directed him to commit a crime by making payments to two women for the principal purpose of influencing an election,” Davis said Tuesday. “If those payments were a crime for Michael Cohen, then why wouldn’t they be a crime for Donald Trump?"

Fox News’ Samuel Chamberlain, Adam Shaw, John Roberts and The Associated Press contributed to this report.