In a deal reached with federal prosecutors, Cohen, 51, pleaded guilty to eight counts in all. He could get about four to five years in prison at sentencing Dec. 12.

NEW YORK — Michael Cohen, President Donald Trump's former personal lawyer and "fixer," pleaded guilty Tuesday 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 influence the election.

The guilty plea came almost at the same moment former Trump campaign chairman Paul Manafort was convicted in Alexandria, Virginia, 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 Dec. 12.

In entering the plea, Cohen did not 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 Playboy Playmate Karen McDougal.

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

As cable networks were showing split-screen coverage of the dueling conviction and plea bargain by two former loyalists, Trump boarded Air Force One in the afternoon on the way to a rally in West Virginia. He ignored shouted questions to reporters about both former aides, retreating to his private stateroom on the airliner.

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

The FBI raided Cohen's hotel room, home and office in April and seized more than 4 million items. The search sought bank records, communications with Trump's campaign and information on a $130,000 payment to Daniels and a $150,000 one to McDougal. Both women claimed Trump had affairs with them, which he denies.

Trump denied to reporters in April that he knew anything about Cohen's payments to Daniels, though the explanation from the president and his attorney Rudy Giuliani have shifted multiples times since.

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. 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 President Bill Clinton during the Whitewater investigation, said of Cohen 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."

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 cooperate, 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 cooperate," she said.

Levenson argued that 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.

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.

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 soon 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.

When Cohen's team produced a recording he had made of Trump discussing one of the hush-money payments, Trump tweeted: "What kind of lawyer would tape a client? So sad!"