By Sharon LaFraniere and Kenneth P. Vogel

New York Times News Service

WASHINGTON, D.C. — Paul Manafort agreed Friday to tell all he knows to special counsel Robert Mueller as part of a plea deal that could shape the final stages of the inquiry into Russian interference in the 2016 election.

The deal was a surrender by Manafort, President Donald Trump’s former campaign chairman, who had vowed for months to prove his innocence in a case stemming from his work as a political consultant in Ukraine. And it was a decisive triumph for Mueller, who has a cooperating witness who was at the center of the Trump campaign during a crucial period in 2016.

Manafort’s decision, announced at a federal court hearing in Washington, D.C. in which he pleaded guilty to two conspiracy charges, was a distinct setback for Trump, who had praised Manafort for standing up to prosecutors’ pressure and had hinted that he might pardon him.

It is not clear what information Manafort offered prosecutors in the negotiations that led to the plea deal. In court Friday, Manafort agreed to an open-ended arrangement that requires him to answer “fully, truthfully, completely and forthrightly” questions about “any and all matters” the government wants to ask about.

The president’s personal lawyer, Rudy Giuliani, quickly sought to distance Trump from the plea deal.

“Once again, an investigation has concluded with a plea having nothing to do with President Trump or the Trump campaign,” he said in a statement. “The reason: The president did nothing wrong and Paul Manafort will tell the truth.”

Manafort joins four other Trump aides who have offered cooperation in exchange for lesser charges in cases that Mueller’s office either pursued or referred to federal prosecutors in New York. They include Michael Cohen, Michael Flynn, Rick Gates and George Papadopoulos.

Manafort, 69, had insisted he would not assist the special counsel’s office. After being convicted on eight felony counts last month, and facing a second trial, Manafort was confronted with the very real prospect of spending the rest of his life in prison.

Under the agreement, prosecutors replaced a seven-count indictment with one that charged two counts of conspiracy that carry a maximum penalty of 10 years behind bars.

Manafort agreed to surrender most of his once-vast personal fortune including three houses and two apartments — one in Trump Tower in Manhattan.