WASHINGTON — Paul Manafort, the disgraced Republican lobbyist and former chairman of Donald Trump’s presidential campaign, was set to face trial later this month over allegations of money laundering, illegal foreign lobbying, witness tampering, and conspiracy against the United States brought by Special Counsel Robert Mueller. It would have been the second trial for Manafort in a month, after a jury in northern Virginia convicted him on tax and bank fraud in late August.

But Manafort has apparently seen enough of the courtroom. On Friday, he plead guilty to two charges of conspiracy against the U.S. and conspiracy to obstruct justice. He had previously faced seven charges brought by Mueller that included money laundering and illegal foreign lobbying. New court documents filed by Mueller also indicate that Manafort will forfeit any assets involved in the two charges, including properties in New York and Virginia and money held in various bank accounts. He could serve as many as 10 years in prison.

In court on Friday, a federal prosecutor on Mueller’s team said Manafort had a cooperation agreement with the government, according to reporters in attendance. His cooperation could include meeting with the Special Counsel without his own attorneys, providing documents, and testifying in court if asked by Mueller to do so. Asked by Judge Amy Berman Jackson if he understood that he was “agreeing to cooperate, wholly and truthfully, with the inquiry being conducted by the Office of Special Counsel?” Manafort replied: “I do.”

Prosecutor Andrew Weismann says there is a cooperation agreement with Manafort

Last month, a jury in northern Virginia convicted Manafort on eight counts of bank and tax fraud, marking the first courtroom victory for Mueller. The conviction carries a sentence of as many as 80 years in prison. Manafort’s guilty plea in the second case brought against him by Mueller spares President Trump and his administration the spectacle of yet another weeks-long trial with Trump’s former campaign chairman in the headlines every day.

The second trial — which would’ve taken place in Washington, D.C.’s district court, located a short distance from Congress and the White House — had the potential to be even more explosive than the first one. Mueller alleged that Manafort and a former business partner, Rick Gates, had worked for more than a decade as an unregistered foreign agents for Ukrainian political parties and politicians, lied to the Justice Department about their overseas lobbying, and hid the millions they earned for their Ukraine work from the U.S. government. Earlier this year, Mueller’s lawyers added two new counts alleging that Manafort and an associate of his had obstructed justice by trying to influence potential witnesses in Mueller’s investigation.

Manafort is the fifth Trump-connected official to plead guilty as part of Mueller’s investigation. The others are former Trump White House National Security Advisor Michael Flynn, campaign foreign policy adviser George Papadopoulos, deputy campaign chairman Rick Gates, and Michael Cohen, Trump’s former personal lawyer, who was charged by prosecutors in the Southern District of New York with the help of Mueller’s team. Attorney Alex van der Zwaan, who assisted Manafort on the foreign lobbying work, has also plead guilty to lying to investigators.