Paul Manafort, former campaign chair of President Donald Trump, has reached a plea deal with Special Counsel Robert Mueller and has agreed to cooperate into Mueller’s inquiry into Russian interference in the 2016 election.

A prosecutor from Mueller’s team announced the arrangement during a court hearing in Washington, D.C., on Friday morning, where Manafort pleaded guilty to two criminal charges to avoid a second trial. The judge stated that the plea deal requires him to cooperate “fully and truthfully” with the special counsel’s investigation.

According to court filings, he will plea guilty to one count of conspiracy against the U.S., related to his foreign lobbying work for Ukraine and his finances, and one count of conspiracy to obstruct justice, related to attempted witness tampering. The filing indicated that Manafort would receive a maximum sentence of 10 years prison.

This new deal will prevent a scheduled second trial for Manafort, which was scheduled to begin in Washington later this month. The two sides have also agreed to resolve 10 mistrial counts from Manafort’s Virginia trial last month. Much of Manafort’s money and property will also be subject to forfeiture.

SLIDESHOW: DONALD TRUMP’S 30 CRAZIEST TWEETS

Before joining Trump’s campaign as chairman for six months, Manafort worked extensively for pro-Kremlin politicians and oligarchs in Ukraine. Prosecutors said the work generated more than $60 million in income and that Manafort laundered this through shell companies and offshore accounts to avoid paying U.S. taxes. He also lied about the nature of the work when confronted by the Justice Department in 2016.

The deal marks the end of one phase of the Mueller investigation. Manafort’s prosecution was the most visible activity of the special counsel’s office so far. It also appeared to be part of an initial stage of the investigation that involved trying to get key Trump aides to flip. Manafort now could provide information of whether the Trump campaign conspired with Russia to interfere with the campaign.

“There’s no fear that Paul Manafort would cooperate against the president because there’s nothing to cooperate about and we long ago evaluated him as an honorable man,” Trump lawyer Rudy Giuliani told Politico on Thursday.

The White House said former Trump campaign chairman Manafort’s decision to plead guilty and cooperate with Mueller is “totally unrelated” to the president.

Press Secretary Sarah Sanders said in a statement, “This had absolutely nothing to do with the President or his victorious 2016 Presidential campaign. It is totally unrelated.”

The president had praised his former campaign chairman for his unwillingness to cooperate with the special counsel to this point, tweeting “Such respect for a brave man.”