WASHINGTON (AP) — President Donald Trump’s former campaign chairman Paul Manafort agreed Friday to cooperate with the special counsel’s Trump-Russia investigation as he pleaded guilty to federal crimes and avoided a second trial that could have exposed him to more time in prison.

The deal gives special counsel Robert Mueller a key cooperator who steered the Trump election effort for a pivotal stretch of the 2016 presidential campaign. The result also ensures the investigation will extend far beyond the November congressional elections despite entreaties from the president’s lawyers that Mueller bring it to a close.

It is unclear what information Manafort is prepared to offer investigators about the president or that could aid Mueller’s investigation into Russian interference in the 2016 election. But his involvement in key episodes under scrutiny, and his leadership of the campaign at a time when prosecutors say Russian intelligence was working to sway the election, may make him an especially valuable witness.

The agreement makes Manafort the latest associate of Trump, a president known to place a premium on loyalty among subordinates, to admit guilt and work with investigators in hopes of leniency.

Tap to unmute

Manafort had long resisted the idea of cooperating even as prosecutors stacked additional charges against him in Washington and Virginia. Trump had saluted that stance, publicly praising him and suggesting Manafort had been treated worse than gangster Al Capone. Trump’s lawyer, Rudy Giuliani, had suggested a pardon might be a possibility after the investigation was concluded.

Then came Friday’s extraordinary development when Manafort agreed to provide any information asked of him, testify whenever asked and even work undercover if necessary.

Mueller has already secured cooperation from a former national security adviser who lied to the FBI about discussing sanctions with a Russian ambassador, a campaign aide who broached the idea of a meeting with Russian President Vladimir Putin; and another aide who was indicted alongside Manafort but ultimately turned on him. Trump’s former personal lawyer has separately pleaded guilty in New York.

Friday’s deal, to charges in Washington tied to Ukrainian political consulting work but unrelated to the campaign, was struck just days before Manafort was to stand trial for a second time.

He was convicted last month of eight financial crimes in a separate trial in Virginia and faces seven to 10 years in prison in that case. The two conspiracy counts he admitted to on Friday carry up to five years, though Manafort’s sentence will ultimately depend on his cooperation.

“He wanted to make sure that his family was able to remain safe and live a good life. He’s accepted responsibility. This is for conduct that dates back many years and everybody should remember that,” Manafort attorney Kevin Downing said outside court.

The agreement doesn’t specify what if anything prosecutors hope to receive about Trump, but Manafort could be well-positioned to provide key insight for investigators working to establish whether the campaign coordinated with Russia.

He was among the participants, for instance, in a June 2016 Trump Tower meeting with Russians and Trump’s oldest son and son-in-law that was arranged for the campaign to receive derogatory information about Democrat Hillary Clinton. He was also a close business associate of a man who U.S. intelligence believes has ties to Russian intelligence. And while he was working on the campaign, emails show Manafort discussed providing private briefings for a wealthy Russian businessman close to Putin.

White House press secretary Sarah Sanders insisted the Manafort case was unrelated to Trump. Giuliani said he spoke to Trump on Friday about Manafort’s plea.

“The president was OK with it,” he said. “In a way, it’s another indication there is no evidence of collusion. All of these charges predate the time Paul spent with the president. And there’s nothing in what he pleaded about collusion.”

It’s unclear how the deal might affect any Manafort pursuit of a pardon from Trump, though Giuliani told Politico before the deal that a plea without a cooperation agreement wouldn’t foreclose the possibility of a pardon.

Under the terms of the deal, Manafort was allowed to plead guilty to just two counts, though the crimes he admitted largely cover the same conduct alleged in an indictment last year. He abandoned his right to appeal his conviction in Virginia and agreed to forfeit homes in New York, including a condo in Trump Tower.

But the guilty plea also spares Manafort the cost of a weekslong trial that could have added years to the prison time he’s already facing following the Virginia guilty verdicts. A jury there found him guilty of tax evasion, failing to report foreign bank accounts and bank fraud. Jurors deadlocked on 10 other counts.

Prosecutors on Friday presented new information about allegations they were prepared to present at trial, which was to have focused on Manafort’s political consulting and lobbying work on behalf of former Ukrainian President Viktor Yanukovych and the pro-Russian Party of Regions.

That case alleged that Manafort directed a large-scale U.S. lobbying operation for Ukrainian interests but never registered as a foreign agent despite being required to do so under the law, and that he concealed millions of dollars in income from the IRS.

He also failed to disclose his involvement in lobbying efforts made through a group of former European politicians, known as the Hapsburg Group, who pushed policies beneficial to Ukraine, the allegations said.

In 2013, one of the politicians and his country’s prime minister met with then-President Barack Obama and Vice President Joe Biden in the Oval Office. Manafort was later sent an email that the politicians had “delivered the message of not letting ‘Russians Steal Ukraine from the West.’”

Prosecutors said he spread stories and secretly coordinated with an Israeli government official to publicize the idea that a U.S. Cabinet official was an anti-Semite for supporting Tymoshenko, who had formed an alliance with a Ukrainian political party that had shared anti-Semitic views.

“I have someone pushing it on the NY Post. Bada bing bada boom,” Manafort wrote to a colleague, court documents said.