WASHINGTON (Reuters) - U.S. President Donald Trump offered up a handful of legal arguments in a series of tweets on Thursday distancing himself from former personal attorney Michael Cohen, who was sentenced to prison on Wednesday for arranging 2016 hush-money payments to women who say they had affairs with the married president.

Cohen admitted his actions were aimed at influencing the election in violation of campaign finance laws and said they were directed by Trump. But the president said in his tweets he never told Cohen to break the law and that the payments were unrelated to the campaign.

The early-morning tweets came as the legal pressure on Trump intensified. Also on Wednesday, federal prosecutors in New York announced they had reached a cooperation deal with National Enquirer publisher American Media Inc, which admitted making a hush payment to a former Playboy model to prevent her from going public with Trump affair allegations before the 2016 election.

Trump has offered a shifting defense on the payments, first saying in April he did not know about them. Later, he seemed to acknowledge the payments were made, but said they were unrelated to campaign finances, as he said again in the latest tweets.

Cohen, who once said he would “take a bullet for Trump,” was sentenced in New York to three years in prison for orchestrating the payments in violation of campaign finance laws before the 2016 U.S. presidential election. He called the payments part of the “dirty deeds” he did at Trump’s behest.

Federal prosecutors said Trump ordered the payouts to protect his campaign from the allegations of sexual affairs.

Trump wrote on Twitter: “I never directed Michael Cohen to break the law. He was a lawyer and he is supposed to know the law. It is called ‘advice of counsel.’ ... This was not campaign finance.”

FILE PHOTO: U.S. President Donald Trump sits for an exclusive interview with Reuters journalists in the Oval Office at the White House in Washington, U.S. December 11, 2018. REUTERS/Jonathan Ernst

The president continued: “Cohen was guilty on many charges unrelated to me.”

The main defense Trump and his lawyers have put forth in recent weeks is that the payments were not subject to campaign finance laws because they were aimed at protecting his personal reputation and would have been made even if he had not been a candidate for president.

His claim on Twitter to have relied on advice of counsel was new though, but legal experts expressed skepticism it would work.

Jessica Levinson, a professor of election law at Loyola Law School in Los Angeles, explained that the defense, often invoked by corporations in complex transactions, depends on a party relying on lawyers in good faith.

But, if Trump had wanted legal advice on this issue, he would have sought out specialized campaign finance lawyers rather than Cohen, Levinson said.

Trump’s campaign did have such specialized counsel, a team of election lawyers from Jones Day led by Don McGahn, who would go on to serve as White House counsel.

Justice Department policy is not to indict a sitting president, but some legal experts have said Trump could be charged after leaving office. Democrats and other critics also have raised the issue of impeachment by Congress.

Trump has denied the affairs. He has also denied the main focus of the investigation by Special Counsel Robert Mueller: whether his campaign colluded with Moscow in its meddling in the 2016 campaign. The Kremlin has denied that any meddling occurred.

Trump has routinely blasted the Mueller investigation as a “witch hunt.”

Mueller referred the Cohen prosecution to federal prosecutors in New York earlier this year.

Prosecutors on Wednesday also said the publisher of the National Enquirer tabloid had struck a deal to avoid charges over its role in one of the payments made “in concert” with Trump’s presidential campaign.

Cohen, who also pleaded to tax evasion and lying to Congress about a proposed Trump Organization building in Moscow, in court on Wednesday said his “blind loyalty” led him to cover up for Trump.

Cohen is the latest Trump associate to be swept up in Mueller’s investigation following Trump’s campaign chairman Paul Manafort, former deputy campaign chairman Rick Gates and former national security adviser Michael Flynn, among others.

In an interview with Reuters this week, Trump slammed Cohen for cooperating with prosecutors and said he was unconcerned about possible impeachment. He also called any of his potential business dealings with Russia “peanut stuff.” [nL1N1YH067]