WASHINGTON — Roger Stone just got three years and four months in prison for lying about his attempts to establish a backchannel between President Trump’s 2016 campaign and WikiLeaks, the group that leaked Democratic emails hacked by Russian spies before the election.

Stone, the infamous GOP political trickster, was charged by former Special Counsel Robert Mueller and convicted on all seven counts against him, including false statements and witness tampering. But speculation is rife that he may soon get a pardon from his friend, Trump, the man prosecutors and the judge said Stone lied to protect.

In sentencing Stone, Judge Amy Berman Jackson slapped down Trump and Stone’s argument that he was merely targeted because of his support for Trump.

“He was prosecuted for covering up for the president.”

“He was not prosecuted, as some have complained, for standing up for the president,” Jackson told the court. “He was prosecuted for covering up for the president.”

Stone was charged with lying to Congress during Mueller’s two-year Russia investigation, and arrested in a pre-dawn raid of his Florida home in January 2019. His trial quickly devolved into weird drama thanks to Stone’s predilection for provocative posts on social media about his own case — resulting in a gag order from the judge, a total ban on using Instagram or Twitter, and repeated hearings over whether he’d violated his gag order or not.

All four prosecutors quit the case last week after Trump’s attorney general William Barr personally intervened to ask the judge for a lighter sentence for the president’s friend. Prosecutors originally asked for 7-9 years. But in a revised filing, Barr’s new team asked for “far less.”

The sentence caps a turbulent and occasionally bizarre trial that began with flamboyant courtroom antics by Stone and ended in a titanic dispute over his sentencing that raised troubling questions about the rule of law in America.

Jackson praised the original sentencing memo from prosecutors as well-reasoned, and noted it was never actually withdrawn. But she said she’d concluded on her own that 7-9 years was too much for the 67-year-old Stone, who hasn’t yet received a date when he will begin serving his sentence.

Regardless, Jackson blasted Stone from the bench for lies, misbehavior, threatening texts, venomous social media posts, and claims victimhood. Both political parties, she said, should recoil at his behavior.

“This is not just campaign hijinks. This is not just, ‘Roger being Roger.’”

“The defendant lied about a matter of great national and international significance,” Jackson said. “This is not just campaign hijinks. This is not just, ‘Roger being Roger.’”

Echoing prosecutors during the trial, she said the judiciary needs to step in to insist that facts still exist, in what appeared to be a jab not just at Stone’s perjury but Trump’s penchant for breezy lying as well.

“The truth still exists,” Jackson said. “The truth still matters.”

The dispute over Stone’s sentencing shook the Department of Justice and prompted over 2,000 former DOJ officials to call for Barr to resign. Career prosecutors and even Barr’s one of Barr’s former top deputies said the incident reeked of political interference in the criminal justice system by the president and attorney general to save Trump’s old friend.

But in a surprise twist at Thursday’s hearing, the new prosecutor who replaced the four who quit in protest last week unexpectedly, and without explanation, reverted back to the original recommendation for Stone’s sentencing — the one Barr criticized as way too harsh — saying: “it was done in good faith.”

Prosecutor John Crabb, who took over the case after last week’s debacle, refused to tell the judge who wrote that second memo seeking a lighter sentence for Stone, even though he signed it. Crabb told Jackson he was “not at liberty” to discuss such internal deliberations, and blamed the reversal on a miscommunication between the local U.S. Attorney and the Department of Justice.

Stone was convicted in a sweeping courtroom defeat last November that turned on the details of what really went down between the Trump campaign and the rogue transparency group WikiLeaks, at a moment when WikiLeaks was pumping out damaging Democratic emails stolen by Russian hackers.

Prosecutors said Stone kept the Trump campaign informed about his efforts, and then lied under oath to Congress to protect Trump because the truth “wasn’t pretty.”

But prosecutors stopped short of concluding Stone succeeded in setting up a truly effective backchannel between the campaign and WikiLeaks. Rather, the case focused on Stone’s lies and attempts to cover up his efforts, including through tampering with another witness, the New York comedian and radio host, Randy Credico.

Stone’s lawyers had insisted Stone wasn’t guilty because he hadn’t intentionally lied to Congress. But they mustered such a weak defense that many legal experts concluded Stone must be banking on Trump to save him, and the jury flatly rejected it.

Such a presidential pardon certainly looks possible, regardless of Thursday’s sentence.

Trump has repeatedly tweeted out support for Stone, and thanked Barr publicly after the attorney general intervened in the case. Even during the Stone sentencing hearing on Thursday, Trump live-tweeted his support for Stone and threatened prosecutions for his enemies.

Stone’s criminal trial marked a tumultuous descent for Stone, the fame-seeking political operative who has somehow managed to feature prominently in huge American political scandals going all the way back to Watergate in the 1970s. Stone, who has counted President Trump as a close friend and confidante since the 1980s, boasts a huge tattooed portrait of disgraced former president Richard Nixon on his upper back and often talks about his admiration for Nixon’s tenacity in the face of political scandal and adversity.

Regardless of Thursday’s sentence, Stone’s legal drama might not be over yet. He’s fighting for a new trial, and his allies are raising money for an appeal even if this verdict sticks. Meanwhile, Trump’s repeated expressions of support for Stone raise the possibility that Trump may swoop in to save his old friend with a presidential pardon.