WASHINGTON — A federal judge in Washington vigorously defended congressional power to investigate national security matters when giving Roger Stone a 40-month prison sentence Thursday, a punishment that "has to send the message that witnesses to do not get to decide for themselves" whether they can mislead lawmakers.

U.S. District Judge Amy Berman Jackson said Stone, the longtime Republican political operative and confidant of President Donald Trump, wasn't just doing his brand of "campaign hijinks" when he lied to a House Intelligence Committee during a probe into Russian interference in the 2016 presidential election.

"He lied to Congress," Jackson said. "Not to some secret anti-Trump cabal, but to Congress. To the elected representatives of both parties who were confronted with a matter of grave national importance."

The truth matters and thinking otherwise is a threat to our institutions, Jackson said, and if it goes unpunished, "everyone loses."

A jury in November convicted Stone, who has long cultured a larger-than-life persona, on charges he lied to Congress, obstructed an official proceeding and tampered with a witness.

At a September 2017 deposition before the House Intelligence Committee, Stone lied about who his back-channel source to WikiLeaks was, the nature of their communications, and whether Stone had communicated what he knew about hacked Democratic emails with the Trump campaign.

Jackson said Thursday that everyone depends on congressional representatives to make the right decisions, protect our elections based on the facts, and that dismay and disgust at Stone's belligerence should transcend party.

"How could the committee do its job and reach the correct conclusion under those circumstances?" Jackson said Thursday.

The attention on Jackson's sentence was enormous because of Trump and Justice Department activities outside the courtroom in the past week.

Trump tweeted that federal prosecutors' sentencing recommendation of seven to nine years in prison for Stone was "unfair." The Justice Department then took the rare step of intervening to rescind that sentencing recommendation. Four career prosecutors resigned from the case in protest.

Trump then tweeted congratulations to Attorney General William Barr for "taking charge" of the case. Former DOJ lawyers and some members of Congress expressed concerns about political interference in the case.

But in the end, the Justice Department on Thursday did not back away from any of its positions in the original sentencing memo. Jackson pressed federal prosecutors about it, but it did not play a major role in the sentencing. And Jackson said she would not have sentenced Stone to the seven to nine years, anyway.

Jackson said the political atmosphere around the case is why sentencing decisions are made by neutral judges who are actually aware of the charges and evidence presented in court — not someone who has a longstanding career or personal link to the case.

"The court cannot be influenced by those comments," Jackson said.

Jackson also pointed to the many people who weighed in, and countered those who said this was a political prosecution by those who sought to punish him for his political actions.

"He was not prosecuted as some have complained, for standing up for the president; he was prosecuted for covering up for the president," Jackson said.

Jackson still has to rule on Stone's motion for a new trial. She ordered Stone to report to the Bureau of Prisons more than two weeks after she makes that ruling. She ordered the BOP to allow Stone to serve his sentence close to family in Fort Lauderdale, Fla.

Stone is likely to appeal his conviction.