Michael Cohen, U.S. President Donald Trump's former personal lawyer and "fixer," has pleaded guilty to campaign finance violations and other charges, saying he and Trump arranged the payment of hush money to porn star Stormy Daniels and a former Playboy model to keep them from exposing their alleged affairs with Trump to influence the 2016 election.

The guilty plea came Tuesday — almost at the same moment former Trump campaign chairman Paul Manafort was convicted in Alexandria, Va., of eight financial crimes in the first trial to come out of special counsel Robert Mueller's sprawling Russia investigation.

In a deal reached with federal prosecutors, Cohen, 51, pleaded guilty to eight counts in all, including tax evasion and making a false statement to a financial institution. He could get about four to five years in prison at sentencing on Dec. 12.

Cohen's account appears to implicate Trump himself in a crime, though whether -- or when -- a president can be prosecuted remains a matter of legal dispute.

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

After Cohen's guilty plea, the lead prosecutor, deputy U.S. Attorney Robert Khuzami, told reporters that Cohen submitted invoices to the candidate's company to obtain reimbursement for the payments but claimed it was for legal services rendered in 2017.

Those invoices were illegitimate, lawyers said. "He [Cohen] provided no legal services for the year 2017," said Khuzami. "It was simply a means to obtain reimbursement for the unlawful contributions."

Cohen said the first payment was "in co-ordination and at the direction of a candidate for federal office," and the second was made "under direction of the same candidate."

Cohen's plea follows months of scrutiny from federal investigations and a falling out with the president, whom he previously said he'd "take a bullet" for.

U.S. President Donald Trump ignored questions about Cohen as he boarded Air Force One for a campaign visit to West Virginia. (Alex Brandon/Associated Press)

FBI raids in April sought bank records, communications with Trump's campaign and information on payments to Daniels and McDougal.

Both women claimed Trump had affairs with them, which he has denied.

It wasn't clear if the plea agreement requires Cohen's co-operation with the Russia probe or other investigations.

President ignores questions

Trump ignored questions about Cohen as he boarded Air Force One for a campaign visit to West Virginia. The White House and the Trump re-election campaign did not immediately respond to requests for comment.

The president has fumed publicly about what he felt was government overreach, while privately worrying about what material Cohen may have after working for the Trump Organization for a decade.

In this April 16, 2018, photo, Stormy Daniels, left, stands with her lawyer Michael Avenatti as she speaks outside federal court in New York. Avenatti tweeted that Cohen's plea deal should open the door to questioning Trump under oath in Daniels's defamation lawsuit against him. (Mary Altaffer/Associated Press)

Trump branded the raid "a witch hunt," an assault on attorney-client privilege and a politically motivated attack by enemies in the FBI.

"Obviously it's not good for Trump," Sol Wisenberg, who conducted grand jury questioning of then-president Bill Clinton during the Whitewater investigation, said of Cohen's plea bargain.

"I'm assuming he's not going to be indicted because he's a sitting president," Wisenberg added. "But it leads him closer to ultimate impeachment proceedings, particularly if the Democrats take back the House."

What it shows is that the people close to the president have criminal exposure and it may mean they don't need Cohen to co-operate. - Laurie Levenson , former federal prosecutor

The Justice Department's Office of Legal Counsel, which provides legal advice and guidance to executive branch agencies, has held that a president cannot be indicted while in office. Trump's lawyers have said that Mueller plans to adhere to that guidance, though Mueller's office has never confirmed that. There would presumably be no bar against charging a president after he leaves the White House.

Laurie Levenson, a former federal prosecutor and professor at Loyola Law School in Los Angeles, noted that the deal does not require Cohen to co-operate, but does not preclude it from happening, which should be worrying to the president and his allies.

"What it shows is that the people close to the president have criminal exposure and it may mean they don't need Cohen to co-operate," she said.

Levenson argued the deal also knocks back the argument that the investigations swirling around Trump are a "witch hunt."

"No longer can you say Mueller is on a witch hunt when you have his own lawyer pleading guilty to things that were designed to impact the election," she said.

On Tuesday, Cohen's lawyer Lanny Davis suggested Trump should face criminal charges.

"If those payments were a crime for Michael Cohen, then why wouldn't they be a crime for Donald Trump?," he tweeted.

Mueller's team is looking into Russian interference in the 2016 U.S. presidential election. The team referred the case involving Cohen's financial dealings to federal prosecutors in Manhattan.

Late Tuesday, Davis told MSNBC's Rachel Maddow that Cohen has knowledge on certain subjects that should be of interest to Mueller and is "more than happy to tell the special counsel all that he knows."

Loyal 'fixer' under investigation for months

The search of Cohen's files sought bank records, communications with the Trump campaign and information on hush money payments made in 2016 to former Playboy model McDougal, who received $150,000 US, and the porn actress Daniels, who got $130,000 US.

Daniels's hard-charging lawyer, Michael Avenatti, later upped the drama by disclosing bank reports showing that Cohen had been hustling behind the scenes to cash in on his close relationship with the president.

Avenatti tweeted that Cohen's plea agreement should open the door to questioning Trump under oath in Daniels's defamation lawsuit against him about "what he knew, when he knew it, and what he did about it."

The New York Times reported earlier this week, based on anonymous sources, that prosecutors have been focusing on more than $20 million in loans obtained by taxi businesses that Cohen and his family own.

Before the election, Cohen had been a trusted member of the Trump organization, working out of an office in Trump Tower next to one used by his boss.

He raised millions for Trump's campaign and, after being interviewed by the House Intelligence Committee last year, told Vanity Fair that Trump had no part in the suspected Russian conspiracy to tamper with the election.

The president's initial support for Cohen after the raid has since degenerated into a public feud, prompting speculation that, to save himself, Cohen might be willing to tell prosecutors some of the secrets he helped Trump keep.

Trump's lawyer Rudy Giuliani has steadily ratcheted up attacks on Cohen, suggesting he was untrustworthy and lying about what he knew about the former celebrity real estate developer's business dealings.

When Cohen's team produced a recording he had made of Trump discussing a payment to silence a woman about an alleged affair, Giuliani went on a media tour to impugn his credibility and question his loyalty.