In the fall of 2004 Vladi­mir Putin suffered a blow he has never forgotten. The fraudulent election of a pro-Kremlin Ukrainian president, which Putin had directly and brazenly engineered, was overturned by a massive popular uprising. What came to be known as the “Orange Revolution” created a model for resistance to rigged elections in autocracies across Eurasia — in Kyrgyzstan, Belarus, Azerbaijan and, in 2012, Russia itself.

Most of the rebellions didn’t succeed. But Putin developed an obsession with “color revolutions,” which he is convinced are neither spontaneous nor locally organized, but orchestrated by the United States — and in the case of the Moscow protests four years ago, by Hillary Clinton herself.

That’s the context in which Russia’s intervention in the 2016 U.S. presidential election must be understood. Putin is trying to deliver to the American political elite what he believes is a dose of its own medicine. He is attempting to ignite — with the help, unwitting or otherwise, of Donald Trump — a U.S. color revolution.

Let’s look at the way those revolts unfolded. In every case, they pitted an outsider political movement against an entrenched elite willing to employ fraud and force to remain in power. The outsiders mobilized their followers to collect evidence of rigging on election day and, when they could, conducted exit polls and “quick counts” to obtain vote totals they could contrast with official results. They disseminated their findings through satellite channels and other foreign media. When the inevitable victory of the ruling party was announced, they called their followers to the streets for mass protests they hoped would cause the regime to crumble — or at least discredit its phony election triumph.

Of course, Trump’s populist campaign is no more comparable to the pro-democracy insurgencies in formerly Soviet lands such as Ukraine and Belarus than Clinton’s administration-in-waiting is to the Putin regime. But Putin’s audacious goal is to create the illusion that they are. “He’s trying to establish that our system is just as bad, just as corrupt, as his,” says Brian Whitmore, a senior editor of Radio Free Europe/Radio Liberty.

Russian President Vladimir Putin says the scandal that has erupted in the United States over allegations Russia hacked Democratic Party emails has not been in Moscow's interests and that both sides in the U.S. election campaign are just using Russia to score points. (Reuters)

The first step of the campaign was to hack the computers of the Democratic National Committee and senior party figures and distribute — sometimes with alterations — material that was purported to show Clinton’s rigging of the system. The DNC was revealed, unsurprisingly, to lean against socialist-turned-Democrat Bernie Sanders; Clinton’s campaign team was shown to be making political calculations about her public statements. As if on cue, Trump and his surrogates responded with mock shock and charges of “corruption.”

Next came the suggestions that the balloting itself might be tampered with. Most likely, that was the point of the hacking probes into the voting systems of more than 20 states, including key battlegrounds such as Pennsylvania and Florida. A joint statement by the Department of Homeland Security and the office of the Director of National Intelligence said it was unlikely voting systems could be tampered with “to alter actual ballot counts or election results.” But the reports of cyber-intrusions are by themselves enough to damage public confidence — which may be the point.

Trump meanwhile plays his part; he could not be doing more to aid the Kremlin’s narrative if he were reading from a script. (Which in some cases, he literally is: See his citation last week of a Clinton-related email doctored by the Moscow-run Sputnik news service.) Repeatedly warning that the election may be rigged, Trump has been enlisting his supporters as observers to watch “certain areas” he is likely to lose, such as Philadelphia. His “Stop the Steal” movement is planning to conduct its own exit polls outside key precincts. Its inevitable reports of “irregularities” will provide the predicate for Trump to claim fraud.

That, in turn, will prompt reactions like that already heard from a Trump supporter at a Mike Pence rally last week. After raising the specter of rigging, she said: “If Hillary Clinton gets in, I myself, I’m ready for a revolution, because we can’t have her in.” After a thousand cable broadcasts of that moment, Putin surely was still smiling.

And the revolution? Putin understands that Washington is not Kiev; mobs are unlikely to mass in front of the White House or Congress. But rebellions can happen online: Imagine a blizzard of Internet posts, reinforced by the Kremlin’s paid trolls, its satellite television network and the Trumpian corners of Fox, alleging that what Trump calls the “political establishment” has stolen the election for Clinton.

That wouldn’t stop Clinton from taking office — any more than the Bolotnaya Square protest in Moscow prevented Putin’s presidential inauguration in May 2012. But Clinton would start her term politically wounded, both domestically and abroad. Putin will have obtained payback. And Trump will have shown himself to be a most useful idiot.

Read more from Jackson Diehl’s archive, follow him on Twitter or subscribe to his updates on Facebook.