A federal judge sentenced longtime Donald Trump ally Roger Stone to 40 months in prison Thursday.

A jury in a federal court in Washington found Stone guilty of witness intimidation, lying to Congress and obstruction of a congressional investigation last November.

He was charged in a seven-count indictment that alleged he lied to lawmakers about WikiLeaks, tampered with witnesses, and obstructed a House intelligence committee probe.

His trial highlighted how Trump campaign associates were eager to gather information about hacked emails damaging to Hillary Clinton that were released by the anti-secrecy website WikiLeaks.

The lead-up to Stone's sentencing has been controversial. The Justice Department overruled its own prosecutors' recommendation for Stone's sentencing last week, lowering the amount of prison time recommended. All four Justice Department prosecutors involved in the case quit the case after their recommendation was overruled.

Those Justice Department prosecutors had recommended that Stone be sentenced to seven to nine years in prison. Judge Amy Berman Jackson said in court Thursday that she thought that recommendation was too long to begin with, and that she likely wouldn't have followed through on those guidelines, regardless of the DOJ's recent actions.

Stone has been a fixture in politics for over a generation. The Republican operative served as one of Trump's attack dogs at the height of the presidential campaign, and the two men were close long before Trump's White House run.