A federal judge on Thursday sentenced Roger Stone, President Trump’s longtime friend, to serve three years and four months in prison for impeding a congressional investigation of Russian interference in the 2016 U.S. presidential election.

The penalty from U.S. District Judge Amy Berman Jackson comes after weeks of infighting over the politically charged case that threw the Justice Department into crisis, and it is likely not to be the final word. Even before the sentencing hearing began, Trump seemed to suggest on Twitter he might pardon Stone. With the proceedings ongoing, Trump questioned if his ally was being treated fairly.

In a lengthy speech before imposing the penalty, Jackson seemed to take aim at Trump — saying Stone “was not prosecuted for standing up for the president; he was prosecuted for covering up for the president.” She also appeared to call out Attorney General William P. Barr, whose intervention to reduce career prosecutors’ sentencing recommendation she called “unprecedented.” But she said the politics surrounding the case had not influenced her final decision.

“The truth still exists, the truth still matters,” Jackson said. “Roger Stone’s insistence that it doesn’t, his belligerence, his pride in his own lies are a threat to our most fundamental institutions, to the foundations of our democracies. If it goes unpunished it will not be a victory for one political party; everyone loses.”