NEW YORK (AP) -- Michael Cohen, President Donald Trump's former personal lawyer and fixer, pleaded guilty Tuesday to campaign-finance violations and other charges, saying Trump directed him to arrange the payment of hush money to porn star Stormy Daniels and a former Playboy model to fend off damage to his White House bid.
Cohen's extraordinary account marks the first time that any Trump associate has gone into open court and implicated Trump himself in a crime, though whether -- or when -- a president can be prosecuted remains a matter of legal dispute.
The guilty plea was part of a double dose of bad news for Trump: It came at almost the same moment his former 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 , including tax evasion. 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" to influence the election.
But the amounts and the dates all lined up with the $130,000 paid to Daniels and the $150,000 that went to Playboy Playmate Karen McDougal to buy their silence in the weeks and months leading up to the 2016 presidential election. Both women claimed to have had affairs with Trump, which he denies.
Cohen, his voice shaky as he answered questions from a federal judge, said one payment was "in coordination and at the direction of a candidate for federal office," and the other was made "under direction of the same candidate."
However, in the charging documents, a news release and comments outside the courthouse, prosecutors did not go as far as Cohen did in open court in pointing the finger at the president. Prosecutors said Cohen acted "in coordination with a candidate or campaign for federal office for purposes of influencing the election."
As cable networks were showing split-screen coverage of the conviction and plea bargain by two of his former loyalists, Trump himself boarded Air Force One on his way to a rally in West Virginia and ignored shouted questions about the men.
Trump's personal lawyer, Rudy Giuliani, noted in a statement that "there is no allegation of any wrongdoing against the president in the government's charges against Mr. Cohen."
Daniel Petalas, a former prosecutor in the Justice Department's public integrity section, said, "This brings President Trump closer into the criminal conduct."
"The president has certain protections while a sitting president, but if it were true, and he was aware and tried to influence an election, that could be a federal felony offense," Petalas said. "This strikes close to home."
After the court hearing, which ended with Cohen released on $500,000 bail, the lawyer wiped away tears as he gazed out a courthouse window. He left the building and headed straight for a black SUV with tinted windows. A couple of people outside chanted, "Lock him up!" as they recorded the scene with their phones.
Under federal law, expenditures to protect a candidate's political fortunes can be construed to be campaign contributions, subject to federal laws that bar donations from corporations and set limits on how much can be given.
"If those payments were a crime for Michael Cohen, then why wouldn't they be a crime for Donald Trump?" Cohen's lawyer, Lanny Davis, tweeted.
Cohen's plea follows months of scrutiny from federal investigations and a falling-out with the president, for whom Cohen once said he would "take a bullet."
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 the payments to the two women.
According to prosecutors, the payment to McDougal was made through the parent company of the National Enquirer. Cohen made the payment to Daniels through his own company and then was reimbursed by Trump, he said.
Trump denied to reporters in April that he knew anything about Cohen's payments to Daniels, but the explanations from him and Giuliani have shifted multiple times since.
The president has fumed publicly about the raid, branding it "a witch hunt," an assault on attorney-client privilege and a politically motivated attack by enemies in the FBI. But privately he has worried about what information Cohen may have after working for the Trump Organization for a decade.
"Obviously it's not good for Trump," Sol Wisenberg, who conducted grand jury questioning of President Bill Clinton during the Whitewater investigation, said of the 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 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.
Daniels said Tuesday that she and her lawyer, Michael Avenatti, feel vindicated and look forward to apologies "from the people who claimed we were wrong."
Nothing made public so far indicates Cohen has agreed to cooperate with prosecutors, but Avenatti said he is certain that is happening.
Mueller's team, which is looking into Russian interference in the presidential election, came across some of the evidence against Cohen in the course of its investigation and referred the matter to federal prosecutors in New York.
Deputy U.S. Attorney Robert Khuzami said that in addition to the campaign finance violations, Cohen failed to report more than $4 million in income between 2012 and 2016, including $1.3 million from his taxi medallion holdings.
Cohen also lied to a financial institution by failing to disclose more than $14 million in debt and obtaining a $500,000 home equity line of credit he wasn't entitled to, Khuzami said. Cohen used that credit line to fund the Daniels payment, prosecutors said.
After making the hush money payments, Cohen submitted phony invoices to Trump's company, ostensibly for services rendered in 2017, the prosecutor said.
"Those involves were a sham," Khuzami said. "He provided no legal services for the year 2017. It was simply a means to obtain reimbursement for the unlawful contributions."
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.
The president's initial support for Cohen after the raid soon degenerated into a public feud, with Cohen hinting he might cut a deal with prosecutors.
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!"
Associated Press writers Tom Hays, Stephen R. Groves and Michael R. Sisak in New York; Jonathan Lemire and Catherine Lucey in Washington; and Michael Balsamo in Los Angeles contributed to this report.