The Russians knew how easy it would be to exploit the hate in our bloodstream before we did.

Senator Richard Burr, Republican chairman of the Senate Intelligence Committee, introducing a bipartisan report on Russian disruption of the 2016 elections, said “In 2016, the U.S. was unprepared at all levels of government for a concerted attack from a determined foreign adversary on our election infrastructure.”

How could this be?

For at least 100 years Russia has been developing and perfecting the methods and means to destroy from within the system it has always despised: democratic capitalism.

Vladimir Putin’s stealth attack on America used all the modern weaponry of cyberspace but it also displayed all the guile of a system created by Vladimir Ilyich Lenin. That system rested on a belief that democratic capitalism could always be more effectively destabilized from the inside rather than requiring war to cripple it.

By 1919 Lenin had gained total control of the Bolshevik revolution and was designing the power structure of the future Soviet Union. Although it would take another two years to end a still-raging civil war Lenin had already targeted Western capitalism and, specifically, Britain for a long-term campaign of infiltration and subversion.

The Russian attack would come in three waves.

The first was to exploit the deep social unrest in Britain following the end of World War I. The working class had provided the cannon fodder for mindless slaughter, and the survivors were turning against a ruling class that had led the war from behind.

The second wave would use the cover of developing trade with the British Empire for building an industrial espionage network and exploiting labor unrest.

The third wave had a far longer and larger ambition – to recruit young, susceptible, clever and willing British agents who would be carefully nurtured and planted in the upper levels of British intelligence and diplomacy.

Lenin’s plan reflected a bedrock view of Western democracy as a soft target that in the end would be brought down by untenable extremes of wealth and poverty. That has endured as an operating principle through Lenin, Stalin and ultimately Putin (who prefers mafia capitalism to democratic capitalism).

Given that premise, it became essential to understand a target country well enough to identify and exploit the divisions within it. Lenin himself knew his enemy at first hand: he had lived in London and used the reading room of the British Museum to sharpen his ideology.

“ The Russians always worked from the bottom up, not the top down. And they understood something that is as salient today as it was in 1919: the quality of the intelligence that flows in is what determines the effectiveness of the work that flows out. ”

As the first attack on Britain began, British socialists declared themselves opposed to Lenin’s “dictatorship of the proletariat”—the Labour Party had no stomach for purges and fanatical oaths of loyalty. But they were conflicted. They opposed efforts by Britain, America and Japan to undermine the Russian revolution—hoping naively that there was a common bond of the mass of people that would reject tyranny.

It was this ambivalence that the first wave of the Lenin attack set out to manipulate. It was directed by a man who could truly be called Russia’s first mole, Theodore Rothenstein, an émigré who was already in place in London.

During the war Rothenstein had successfully infiltrated British wartime planning by working for MI7, a branch of military intelligence, and passed on a valuable and detailed picture of how that worked to Moscow.

With the end of the war Rothenstein was directed to actively foment trade union- led strikes in shipyards, coalmines and factories, which he did with some success.

More bizarrely, Rothenstein funded and cultivated one of the leaders of the suffragette movement, Sylvia Pankhurst, who—swallowing Soviet propaganda whole—launched and ran an outfit called The People’s Russian Information Bureau in the belief that Soviet Russia would turn out to be a utopia for women.

Pankhurst was later arrested and served a six-month sentence for publishing “seditious” articles.

Some of the funds Rothenstein used came from selling diamonds “liberated” from the Romanovs. Rothenstein’s wife and daughter helped themselves to diamond-laden jewelry until Rothenstein’s masters in Moscow warned that these displays made them too conspicuous.

In fact, British intelligence had gathered a thick file on Rothenstein and tracked all his moves. From 1917 onward British code-breakers had read all the traffic between Moscow and London. The Bolsheviks had abandoned Tsarist-era codes for a simpler system that the British had been able to crack with the help of a team of émigré women.

Before the war ended British intelligence began sharing information with the Americans, under a treaty that remains in place today. The U.S. Attorney General, A. Mitchell Palmer, directed a new unit, the Bureau of Investigation, to run counterintelligence operations and its most assiduous agent was a young J. Edgar Hoover. Fear of Bolshevik penetration was so great that the Philadelphia Inquirer editorialized: “We may as well invite Lenin and Trotsky to come here and set up business at once.”

The second phase of Lenin’s European plan began in 1920 with the arrival of a Soviet trade delegation in London. Winston Churchill, fiercely anti-Bolshevik, was secretary of state for war and air in a coalition government and refused to attend an official reception for the Russians, saying he refused to shake hands “with a hairy baboon.”

The head of the delegation promised they would not attempt to interfere in British politics in any way. British intelligence swiftly identified the delegation’s number two as a secret agent and knew that he was working with Rothenstein. When Rothenstein made a trip to Moscow he was refused re-entry to Britain on the advice of British intelligence, and never returned.

Lloyd George, the British prime minister, agreed to allow the trade delegation to work in London on the grounds that, with its codes broken, it was turning out to be a priceless source of information on Soviet agents in Britain.

Meanwhile, back in Russia the Cheka, the secret police that had ruthlessly enforced party loyalty on the people and the Red Army, expanded to include counter-intelligence and overseas espionage and morphed into the State Security Committee, Komitet Gosudarstvennoy Bezopasnosti—the KGB.

The third phase of the attack on Britain was, in the longer term, by far the most effective. The British counter-intelligence work that had been so effective in the first two attacks totally failed this time—largely because the moles planted by Moscow in the upper reaches of British intelligence came from the same class as the spycatchers and, unlike Russian agents, were above suspicion.

Of those moles those recruited while at Cambridge University in the early 1930s were the most lethal—the spy ring now known as the Cambridge Five: Donald Maclean, Guy Burgess, Kim Philby, Anthony Blunt and John Cairncross.

It’s important to note that the long record of Russian attacks on Western democracies shows how astute they usually were in “reading” a country.

For example, when they attacked Britain they were far shrewder than Hitler, who naively believed that he could keep Britain out of World War II by suborning the British aristocracy and, in the person of the Duke of Windsor, the royal family.

The Russians always worked from the bottom up, not the top down. And they understood something that is as salient today as it was in 1919: the quality of the intelligence that flows in is what determines the effectiveness of the work that flows out.

In 2016, when the troll farm in St. Petersburg that went under the name of the Internet Research Agency ran a social media campaign directed at our elections, it was fully informed by a picture of fissures in American society that were ripe for incitement.

A common thread was grievance. Whether expressed openly in the rantings of Breitbart or hidden in the dark margins like 8chan, angry people, many of them white, felt dispossessed and looked for somebody who heard them and would help them avenge their mistreatment—an inciter-in-chief.

We know that more than two years before the election two Russian women made a three-week reconnaissance tour of battleground states, including Colorado, Michigan and New Mexico. Hundreds of email, PayPal and bank accounts, as well as driver’s licenses, were created under false identities, sometimes using stolen Social Security numbers.

But the fieldwork that went into the St. Petersburg operation must have been far deeper and wider than that to achieve the sophistication of the social media attack.

The most openly blatant Kremlin offensive was the hacking of the Democratic National Committee’s emails. That was driven in part by Putin’s personal loathing of Hillary Clinton. In the bigger picture, however, as we can now see, the most corrosive and lasting damage was achieved by stimulating extreme factions on the right like the white supremacists who chanted “the Jews will not replace us” at Charlottesville (some of whom, according to Trump, were “good people.”).

Little was done to protect against the attacks. In response, the Obama administration chose unilateral disarmament. In 2015 the State Department aborted the launch of a special unit that had been designed to counter a Russian disinformation campaign. A beta website was ready but State Department officials closed it down.

In a New York Times op-ed last week week Susan Rice, Obama’s national security adviser from 2013 to 2017, wrote, “Our domestic fault lines remain our greatest national security vulnerability.” It’s a pity that apparently she didn’t realize that in 2015.

President Obama may have told Putin to his face to “cut it out” but Putin was by then fully committed to a course of action that in the measured words of the Mueller Report waged “a social media campaign that favored presidential candidate Donald J. Trump and disparaged candidate Hillary Clinton.”

Putin was taking a gamble. There was no way of his knowing that Trump would win by a margin of 77,000 votes spread between three states. The Kremlin isn’t that omnipotent.

But once Trump was in the White House he became Putin’s useful idiot beyond the Kremlin’s wildest dreams. With the help of Rep. Devin Nunes, Republican head of the House intelligence committee, he orchestrated a direct assault on the body that best understood the Russian attacks, the FBI.

Nunes released his now infamous four-page memo alleging an FBI conspiracy against Trump, specifically citing the counter-intelligence division, the very people who were in the front line of the defenses against Russia.

Two of those targeted, Deputy FBI Director Andrew McCabe and the head of the counter-espionage division, Peter Strzok, have now both filed suits alleging that their dismissals were retaliation for their pressing on with the Russian investigation.

In the Republican playbook (and Trump’s rhetoric) the real internal danger to America was not Russia but an overmighty counter-intelligence force.

Senate Majority Leader Mitch McConnell has been the steadfast backstop for this travesty. Earlier, in 2016, he blocked a proposal by Vice President Joe Biden to issue a bipartisan statement condemning Russian interference in the election. Since then he has worked hard to earn the soubriquet of “Moscow Mitch” coined by Joe Scarborough.

Three months after McConnell made sure that sanctions on some Kremlin-linked oligarchs were lifted it transpired that one of those oligarchs, Oleg Deripaska, was instrumental in ponying up a $200 million investment in a new aluminum plant in McConnell’s home state, Kentucky. McConnell claims that when—despite the objections of 11 Republicans—he got the sanctions lifted he had no knowledge of the impending deal. But you can be sure that the Kremlin knows enough about McConnell’s power to know the value of pumping money into Kentucky.

I have written before that McConnell behaves like the apparatchiks of the Soviet system—“a man not of grand plans, but of a hundred carefully executed details.” In his hands the legislative process is operated strictly as a party apparatus, not a broad deliberative instrument of democracy.

By operating like this and in his response to the Russian offensive McConnell has become Putin’s second useful idiot after Trump.