First Donald Trump fired his acting attorney general for refusing to enforce his travel ban. Then he fired his national security advisor, after it emerged he had breached ethics and protocol by discussing sanctions with the Russian ambassador, and then lied about it. Now there’s a fresh casualty of Trump administration: James Comey, the FBI director, who reportedly learned about his dismissal by seeing it aired on TV.

Comey is a controversial character. Ten days before the presidential election, he took the unprecedented step of writing to Congress that he was re-opening the probe into Hillary Clinton’s e-mails, as potential new evidence had been discovered. No new incriminating evidence against Clinton emerged, and she was cleared a second time the day before the election, but the damage had already been done. This letter, which some have suggested broke the law, provoked fury from Democrats who accused Comey of trying to influence voters, and while there’s no knowing what effect it had on the result, late shifts in voting intentions in key states indicate it may have swung Trump the election. At a congressional hearing last week, Comey defended his last-minute intervention, and said if he was faced with a similar choice again, he would do the same thing.

Trump himself has also had a tumultuous relationship with Comey. Back in July, when Comey announced Clinton would not be facing charges, Trump castigated the FBI director for being too soft on his rival, tweeting “impossible for the FBI not to recommend criminal charges against Hillary Clinton. What she did was wrong!” and “FBI director said Crooked Hillary compromised our national security. No charges. Wow! #RiggedSystem”. Trump had a sudden change of heart after Comey’s shock letter to Congress in October, which he praised and said “took a lot of guts”. He has spoken positively about Comey since becoming president, despite his regular attacks on the intelligence community.

That all changed last night, with a letter of dismissal that has shaken Washington and infuriated Republicans and Democrats alike. Trump’s decision to fire Comey is, according to the White House, based on the recommendation of deputy attorney general Rod Rosenstein, who argues in his letter that Comey mishandled the Clinton e-mail investigation to such an extent that “the FBI’s reputation and credibility have suffered substantial damage”. Rosenstein writes that Comey not only overstepped with his public announcements on the developments in the Clinton case, but that he broke the fundamental principles of the FBI and has refused to acknowledge this grave error of judgement. He cites multiple legal experts who are shocked at Comey’s behaviour, and his conclusion that this man can no longer be an effective head of the FBI seems, in light of the evidence, reasonable.

Reasonable, that is, until you remember that Trump praised Comey for the very errors of judgement that the deputy attorney general now argues are grounds for his dismissal. So what’s going on?

The answer is, yet again, Russia. Two separate congressional committees are currently investigating the role of Russian interference in the US election, including the potentially illicit contact between the Trump campaign and Kremlin officials. On Monday, former acting attorney general Sally Yates testified to the Senate that she had warned the White House that Michael Flynn (Trump’s former – and now disgraced – national security advisor) might have been compromised by Russia, and been promptly fired. A grand jury in Virginia is subpoenaing records related to Flynn, who is now under investigation for his links to both Russia and Turkey. Three other former Trump campaign officials (Carter Page, Roger Stone, and former campaign chair Paul Manafort) have financial ties to Russian oligarchs and are under FBI investigation too. So far, these probes have not focussed on Donald Trump himself, but it is only a matter of time before people start asking – under oath – what the president knew, and when.

Trump is not happy about this. According to White House advisers, the president is furious that all the power of the Oval Office has not been enough to wipe these Russia rumours out of existence. Josh Dawsey at Politico writes:

“He had grown enraged by the Russia investigation, two advisers said, frustrated by his inability to control the mushrooming narrative around Russia. He repeatedly asked aides why the Russia investigation wouldn’t disappear and demanded they speak out for him. He would sometimes scream at television clips about the probe, one adviser said.”

But you don’t need to rely on anonymous White House sources to realise that Trump’s firing of Comey has little to do with Hillary Clinton, and everything to do with Russia. The president himself revealed his real concerns in his letter to Comey, in which he wrote:

“While I greatly appreciate you informing me, on three separate occasions, that I am not under investigation, I nevertheless concur with the judgment of the Department of Justice that you are not able to effectively lead the Bureau.”

Why did Comey tell Trump that he wasn’t under investigation, and why did Trump feel the need to stress those assurances in a publicly released letter of dismissal? The White House has refused to comment on these alleged conversations, but if what Trump wrote is true, that is a breach of FBI ethics that rivals the Clinton e-mails announcement. And even if it isn’t, it reveals a president obsessed with trying to control an FBI investigation that impacts the resilience of American democracy.

Donald Trump is a control-freak president – this is not news. Since his inauguration he has attempted to run the US government like one of his businesses, with no awareness or respect for the different branches of government, the role of the courts, or even the constitution. It is clear from the timing of Comey’s dismissal and the very words Trump used to fire him that this is about influencing an ongoing investigation, not strengthening public confidence in US intelligence and law enforcement. Comey’s maverick nature has benefited Trump on multiple occasions – not only the Clinton e-mail announcement, but also the FBI director’s failure to reveal a concurrent investigation into the Trump team’s connections with Russia, that began months before the election. But even so, Comey was the autonomous leader of a non-partisan agency that has the potential to bring down Trump’s administration. As Michael D. Shear and Matt Apuzzo at the New York Times write: “For Mr. Trump, a president who puts a premium on loyalty, Mr. Comey represented an independent and unpredictable director with enormous power to disrupt his administration.”

Now Trump will get to appoint a new FBI director, someone more friendly to the president’s interests and less concerned with investigating exactly what murky links exist between Washington and Moscow. By firing Comey, Trump has just removed one of the few individuals left who can hold him to account.