Each year on December 20, the Russian intelligence community pays homage to its enduring guardianship of the Motherland. It was on this date in 1917, six weeks after the Bolshevik Revolution, that Vladimir Lenin established the Cheka, an acronym for “Emergency Commission.” Over the ensuing decades, the commission’s nomenclature and organization chart mutated: It became the OGPU from 1923 to 1934, the NKVD until the early 1950s, and then the KGB for nearly 40 years. After the collapse of the USSR, the sprawling institution was split into separate foreign and domestic agencies. Operatives of both are still called chekists, and they share Lenin’s original purpose: countering Russia’s enemies at home and abroad.

President Vladimir Putin was a KGB officer for 15 years leading up to the fall of the Soviet Union, and the director of domestic intelligence in the late 1990s during his meteoric rise to power. He regularly throws a gala at the Kremlin on December 20 to extol the “sacred mission” of the state security services, recall their past heroes, and highlight their latest exploits. For the last 22 years, Chekist’s Day has been an official holiday in Russia.

Last December, Putin must have been in particularly ebullient sprits. Over the course of 2016, he oversaw the boldest, most consequential covert operation against Russia’s principal ideological and geopolitical foe for much of the last century, breaching the firewall of American democracy and influencing a high-stakes presidential election. Putin seemed to have made a big bet and come away with a trifecta: He could congratulate himself for settling old scores with a traditional foe, relish the prospect of a Russia-friendly counterpart in the White House, and let the ripple effect of the U.S. election further confound and further unsettle the democracies in a wobbly Europe.

Meanwhile, the reverberations of the Russian attack have the U.S. government in an uproar. The disruption has triggered bitter public tensions between the White House and the agencies it supervises, fueled a partisan debate in Congress, and opened a schism within the Republican party, most recently over potential perjury by the nation’s top justice official.

Ever since Lenin dispatched the first Soviet undercover agent across the Atlantic in 1921, Kremlin leaders have sought, with some success, to undermine the United States. In the late 1940s, Lavrentiy Beria, the head of Joseph Stalin’s secret police, masterminded the pilfering of America’s nuclear secrets. There were also sub rosasorties into American domestic politics. In 1968, the Kremlin deemed Richard Nixon “profoundly anti-Soviet,” and sought to frustrate his White House aspirations by extending financial assistance to his Democratic rival, Hubert Humphrey, who rejected the offer. The Soviets were particularly active in the 1976 presidential election, fabricating an FBI report designed to damage Senator Henry “Scoop” Jackson, a Cold War hawk, during his bid for the Democratic nomination, then recruiting a mole inside the Democratic Party to report on Jimmy Carter’s winning campaign. Once Carter was in the White House, the KGB attempted to smear his hardline National Security Adviser, Zbigniew Brzezinski, as a traitor and anti-Semite. In 1982, Yuri Andropov—the chairman of the KGB, who would soon ascend to leadership of the Kremlin—directed a multi-pronged campaign to thwart the re-election two years later of Ronald Reagan, who famously called the USSR “the evil empire.” Ironically, Andropov wanted his successor to be Mikhail Gorbachev, who, later in that decade, would forge a transformative partnership with Reagan.

But most of these efforts failed, and all of them pale next to Russia’s attempts to hack both major U.S. political parties, and subsequent leak of a trove of documents in an effort to sabotage Hillary Clinton’s presidential campaign. Two weeks before Donald Trump’s inauguration, U.S. intelligence agencies released a public report describing the Russian operation as a Putin-ordered influence campaign intended “to undermine public faith in the U.S. democratic process, denigrate Secretary Clinton, and harm her electability and potential presidency.” Putin’s government, the intelligence community concluded, “developed a clear preference for President-elect Trump.”

Putin saw Clinton as a serial regime-changer, eager to foment yet another “color revolution” in Russia like those in Georgia, Ukraine, and Kyrgyzstan, three former Soviet republics. He made no secret of this conviction. On December 5, 2011, Clinton publicly questioned the openness of parliament elections in Russia. In response, Putin accused Clinton of “set[ting] the tone for certain actors inside [Russia]. She gave the signal,” he said at televised crisis meeting with his subordinates. “They heard this signal and, with the support of the U.S. State Department, started actively doing their work,” he said. He was referring to the tens of thousands of Russian citizens who protested peacefully against his sudden announcement in September of that year that he would return to the presidency after serving as prime minister for four years.

Clinton’s support for the demonstrations hardly constituted a threat to Putin’s return to the Kremlin. But it seems he saw it that way. This conspiracy theory was typical of a worldview forged during his years at the KGB working chiefly in counterespionage—less a spy, and more spy-catcher, a profession that not only generates paranoia but also, to a degree, demands it. Aside from his anyone-but-Clinton mindset, Putin had additional reasons to boost her opponent: Candidate Trump’s admiration for Putin; his declared preference for nationalism over globalism; his apparent intention to revert to a world order based on great-power spheres of influence; his skepticism toward the European Union (he has urged members to follow Britain to the exit); and his denigration of NATO as “obsolete.”

Those last sentiments have been especially unsettling. Nothing would please Putin more than for the 45th president of the United States to weaken the political West’s two bedrock institutions—or, better yet, to allow them to be dismantled, altogether. During Trump’s campaign and transition, Putin must have been delighted to hear him repudiate the values and strategy of Atlanticism that guided his 12 predecessors—six Democrats and six Republicans—stretching back 70 years to Harry Truman. The dissolution of the political West would be delicious payback for what, in Putin’s eyes, was a Western plot to tear the Soviet state asunder.

This theme in Putin’s narrative of grievance against North America and Western Europe is a bizarre case of cognitive dissonance: His rise would have been impossible if not for the patronage and promotions of Boris Yeltsin, who, in 1991 and 1992, was the principal instigator of the breakup of the Warsaw Pact and the USSR itself.

Yet Putin has managed to rewrite history for much of Russia’s citizenry and for himself, in order to justify a revanchist foreign policy. Therefore, he had every reason to cast his own vote in the U.S. election and, on November 8, celebrate the result. U.S. intercepts of Russian communications indicate that top officials in Moscow did not wait until Chekist’s day to pop the champagne bottles when they heard the final returns. They toasted Trump’s victory—and their own.

The vast damage to American interests wrought by Putin is likely to deepen for years to come. It is bad for Trump, since the ongoing revelations of a foreign adversary’s contamination of an American election undermines the outcome’s validity. This would be the case however Trump handled the matter, but he has exacerbated the qualms and controversy. His fury over leaks from U.S. intelligence agencies and investigative stories by the mainstream American media created the impression that he is shooting the messengers in order to divert attention from the core message that Russia successfully attacked America’s democracy, tarnished its reputation worldwide, and cast a pall over its president’s legitimacy. Trump has seemed more outraged at his own government than Putin’s, rousing public anger from two former CIA directors. During the campaign, Mike Morrell, former acting director of the CIA under Obama, called Trump Russia’s “unwitting agent.” Michael Hayden, who led the agency under George W. Bush, chimed in, scorning Trump as Moscow’s “useful fool.”

There is perhaps no more vivid instance of the president’s odd, insouciant posture toward Russia than the Michael Flynn episode. Before Trump’s inauguration, Flynn, his pick for national security adviser, indicated to Sergei Kislyak, the Russian ambassador in Washington, that the White House might ease or lift the sanctions President Obama imposed on Russia for its alleged interference with the U.S. election. What Trump knew of those conversations remains unclear. But when he fired Flynn for lying to Vice President Mike Pence about the conversation with Kislyak, Trump said, “I would have directed him to do it if I thought he wasn’t doing it.”

While Trump’s team seems to have sent a welcome signal to Moscow, the president himself declared a vendetta against his own agencies. The White House put out the word that a billionaire financier and political ally of Trump’s, Stephen Feinberg, would conduct a broad review of the U.S. intelligence community. The episode seemed like punishment of the agencies for gathering information on contacts between the president’s campaign aides and Russian agents over the last year and for leaking them. In February, when details of an ongoing FBI probe into that embarrassing and potentially criminal matter appeared in the press, Trump’s White House leaned on the bureau to discredit them. The FBI refused.

Meanwhile, longstanding allies and friends of the United States are appalled by his constant effort to change the subject whenever the Russian mega-hack comes up. While the president’s national-security team has sought to reassure America’s allies around the world, many leaders, especially in Europe, are concerned that he remains in thrall to Putin who, in some cases, continues to meddle in their own elections. For example, he is deploying an array of clandestine, propagandistic, and financial assets to tip the scales in favor of France’s Marine Le Pen, who has sworn to remove the country from the European Union if she becomes president this year, while working against German Chancellor Angela Merkel, the most stalwart and powerful champion of the Western-led liberal world order, who is under political stress herself.

The Russians make no secret of their intent, nor did Putin just sit back and watch these benefits to Russia accumulate. He continued to prod, provoke, and jeer. Two weeks ago, his Foreign Minister Sergei Lavrov put Putin’s goal in stark, smug terms: The world is on the brink of a “post-West” order, he said. The unmistakable implication is that the locus of global power will move eastward, reinforcing the Kremlin’s ability to design and enforce an order that suits its national and nationalistic interests.

Given how Russia has manifested those interests—perpetuating the carnage of Syria’s civil war, annexing Crimea and virtually occupying the Donbass region of Ukraine, keeping ethnic conflicts simmering in the Caucasus, attempting to overthrow a pro-Western government in Montenegro, engaging in constant military incursions, cyberattacks, provocations, and bullying in the Baltics—we have a clear idea of what sort of “order” Putin has in mind.

But therein lies some consolation. Over the centuries, Russia has shown a predilection to overplay its hand. Precisely because of Putin’s flagrant forays beyond Russia’s borders, he has awakened its neighbors to the threat—and, as a consequence, underscored the need for NATO and an equally vigilant, clear-eyed, and reliable U.S. administration.

Curiously but mercifully, both Putin and Trump have made mistakes that could have salutary consequences.

Putin’s scheme to affect the 2016 election was, almost certainly, intended to remain a secret. In that regard, it was a failure. Its exposure now threatens to overwhelm the American political leader who was supposed to be the beneficiary of the Russian operation.

Trump now has less support and political capital to forge ahead with his much-ballyhooed project to improve White House-Kremlin relations in ways that would please Putin and further unsettle Russia’s neighbors. Relieving sanctions imposed on Russia in response to its mauling of Ukraine, or forming an alliance with Russia against the Islamic State that would leave Bashar al-Assad in place in Damascus have become much harder for him.

Trump has further hobbled himself by waging his two-front feud with the intelligence community and the Fourth Estate. The longer he keeps this up, the more they will defend their independence and fight back with facts that the president has ignored or belittled. ­­And the more it will look like the president is hiding something.

Trump has further hobbled himself by waging his two-front feud with the intelligence community and the Fourth Estate.

Meanwhile, America’s constitutional reliance on the separation of powers and checks and balances is beginning to kick in. For the most part, GOP control of both houses of Congress has given Trump latitude to bob, weave, and counterpunch at bearers of bad news from agencies that report to him. But that may be changing.

In February, Iowa’s Joni Ernst, a retired army officer and member of the Senate Armed Services Committee, called on Trump to “step up” in response to Russia’s provocative behavior, questioning the White House’s stance in the wake of Flynn’s resignation. Along with seven other Republicans—Rob Portman, Jim Inhofe, Susan Collins and Lindsey Graham among them—she signed a letter urging the president to get tough on Russia. Graham, who is also a member of the Armed Services Committee, vowed to European allies at a conference in Munich last month that 2017 will be “a year of kicking Russia in the ass in congress.” Senator John McCain, who chairs that committee, has raised pointed questions about the administration’s “intentions” toward the country.

Even Senate Majority Leader Mitch McConnell, who has been reluctant to cross the president, has said that an investigation of Russian involvement in the election is “highly likely.” Richard Burr, chair of the Senate Intelligence Committee and a vocal supporter of the president, vowed aggressive oversight of the matter, as well as of contacts between Trump campaign staff and Russian officials. But with the news that Burr agreed to work on behalf on the White House to discredit unfavorable coverage of those contacts, there is reason to doubt his impartiality. As Burr’s credibility wanes, the necessity for his GOP colleagues to step up increases.

Now Trump’s attorney general, Jeff Sessions, is under the cloud of controversy. In recent days, it surfaced that Sessions had twice been in contact with Ambassador Kislyak, a fact that he had previously denied during his senate confirmation hearing. That has led House Majority Leader Kevin McCarthy to urge that Sessions should recuse himself from whatever investigations are looming for the sake of maintaining “the trust of the American people."

While Congress ramps up its scrutiny, the most important dynamic may turn out to be the one between members of his high command. Secretary of Defense James Mattis, National Security Adviser H. R. McMaster, and Chairman of the Joint Chiefs of Staff Joseph Dunford, need no convincing of Putin’s motivations and future intentions. With the support of Secretary of State Rex Tillerson, perhaps they can convince their boss. So far, they seem to have made some headway: Trump has stopped calling the Atlantic alliance “obsolete,” and reiterated his support for NATO during his speech to a joint session of congress on Tuesday.

If these factors—congressional and constituent pressure, along with advice from within the president’s inner circle—converge, it is possible that when the centenary Chekist’s Day rolls around next December, the atmosphere may be more sober than the celebration of three months ago. Russia’s chekist-in-chief may come to recognize that his breathtaking effort to manipulate the U.S. election has generated a salutary backlash in America, the new administration toward a healthy posture of continuity with its predecessors. If President Trump embraces that trend, Putin’s victory could turn out to be a Pyrrhic one.