There’s a lot to parse when it comes to Russia’s role in the US election — both the overwhelming evidence that it interfered in the vote and the recently disclosed CIA conclusion that it did so in order to help get Donald Trump elected. But there’s an even more fundamental question that needs to be answered:

What the hell are the Russians thinking?

Interfering in a US election is a dangerous game. Imagine if Hillary Clinton had won — as virtually every pundit and statistical model was predicting at the time that Russia started leaking hacked emails of Clinton allies. The Russians would have infuriated the most powerful person in the world.

That didn’t happen, and the US instead elected the most Kremlin-friendly presidential candidate in recent American history. But it’s not clear that Russia will get off scot-free, with lawmakers from both parties calling for as-yet-unspecified punitive measures designed to retaliate for Moscow’s interference in the 2016 elections and to deter Russia from trying to meddle in elections to come.

So why take the risk? Part of the answer has to do solely with Trump’s jarringly positive views of Russian President Vladimir Putin and his willingness to embrace policies — like potentially pulling the US out of NATO — that have long been among the Russian strongman’s top strategic objectives. Compare this with Clinton’s long record of hawkishness on Russia, and Trump was (from the Kremlin’s perspective) a far better choice.

But there’s a deeper answer, according to several Russia experts: The Putin government is much weaker than it appears, and the hack comes from a position of weakness, not confidence.

“If you can divide [Western countries], even in a half-assed way, that’s good”

Their argument is that Moscow is outclassed militarily by the US and its NATO allies and buckling economically under the weight of international sanctions and low oil prices. It’s a country that’s very far from reaching the heights of power that Putin wants for it.

The hack, on this analysis, is the clearest evidence yet of how far Putin is willing to go to weaken his rivals and thus raise Russia’s relative strength. He’s not trying to repair his own government; he’s trying to damage those of other countries. With a democracy like the US, the best way to do that is to use a large and sophisticated propaganda campaign to shake confidence in the election and elect a threat to the established Western order like Trump.

“The military balance is grim; the economic balance is grim. And so how do you deal with that?” asks Dan Nexon, a professor at Georgetown University who studies great power politics. “[Information warfare] is pretty much what the Russians have going for them.”

Trump’s instincts are a lot friendlier to Putin than Clinton’s

Nobody really knows what Donald Trump will do as president. But if his policy ideas voiced during the campaign were a good guide, the Kremlin will have reason to celebrate.

Trump has praised the Russian bombing campaign in Syria, supported moves like Brexit that destabilized Russia’s European rivals, and personally praised Putin. Most importantly, he has mused about weakening American commitment to NATO. Nothing Putin could do on his own would help Russia’s standing on the world stage and regional influence more than the collapse of the Cold War–era military alliance.

Now, we don’t know how exactly how seriously to take Trump’s musings about NATO. He could change his tune once in office, given the immense pressure that would come from lawmakers, allies, and the American security establishment. It’s hard to say, and uncertainty when it comes to America is definitely worrying to Russian security people.

What is clear, though, is that Putin and his allies really didn’t like Hillary Clinton.

“Hillary is the worst option [from the Russian point of view],” Fyodor Lukyanov, the chair of Russia's Council on Foreign and Defense Policy and an influential voice in Russia’s security establishment, told Vox last year. “There is a widespread view that she personally hates Putin.”

The Kremlin saw her proposals for a no-fly zone in Syria and a history of aggressive criticism of Russian foreign policy as strong evidence that the US would be more confrontational toward Russia with President Clinton in the White House. Even if the Russians aren’t convinced that Trump would be good for them, they could very well think he’s better than the alternative.

“I was in Moscow just last week ... and my sense is they’re concerned and confused about what a Trump presidency means,” Alina Polyakova, the deputy director of the Dinu Patriciu Eurasia Center at the Atlantic Council, tells me. “Trump is absolutely a risk. [But] it was worth the risk, from the Kremlin’s point of view.”

The Putin regime is much weaker than you think

But the mere fact that the Russians preferred Trump to Clinton doesn’t explain why they’d be willing to actively support him. There were doubtless US elections during and after the Cold War where the Russians had a preferred candidate, but Moscow has never intervened as aggressively as it appears to have done in 2016.

“What’s new is how brazen and explicit it has been,” Polyakova says.

So why? Why would the Russians so boldly attempt to elect their preferred candidate, knowing that the intervention carried a serious risk of American retaliation?

Some experts argue that the key variable here is Russian weakness, not strength. To understand this, you need to understand Russia’s strategic situation a little bit better.

By any metric — defense spending, control of advanced military tech, you name it — the United States is by far the world’s most dominant military power. A recent book by Dartmouth’s Stephen Brooks and William Wohlforth attempted to quantify the degree of American dominance in these terms. Their findings were unequivocal.

“Our investigation shows that the United States indisputably remains the sole superpower, and the gap between it and the other powers ... remains very large,” they write.

Russia, by contrast, fell into disrepair after the collapse of the Soviet Union — and modernization efforts under Putin have failed to come close to making up the gap. When you add America’s might to that of its NATO allies, some of which have increased defense spending in response to Russian military adventurism in Syria and Ukraine, the picture for the Kremlin looks quite bad — “much, much weaker,” as Nexon put it in our conversation.

The Russian economy, likewise, is in dismal shape. Russia has depended heavily on trade in natural resources, particularly oil and gas; the recent collapse in oil prices and spread of shale gas in the West has been painful for Russia. Western sanctions, punishment for its invasion of Ukraine, have made it much harder for Russian corporations in key sectors (including oil and banking) to do business abroad.

The result is an economy that has been in recession for two years. GDP has declined to roughly the level it was in the immediate wake of the 2008 financial collapse:

The result, then, is that you have a Russia that is extremely limited — at least, compared to what it once was. Russia can bully around a weaker non-NATO state, like Ukraine; it can help prop up an ally against ragtag rebels, as in Syria. But it cannot challenge the Western-led alliance for global supremacy in the way the Soviets could.

Putin can’t change this — he can’t rebuild the Russian military overnight, or solve its fundamental economic weakness relative to America. That means that accomplishing his ultimate goal of restoring Russian greatness means he needs to break the American-led alliance — somehow persuading these countries to abandon institutions like NATO and take a softer view of Moscow’s overseas meddling.

“Information operations” — like, say, hacking a political party’s emails and dumping them publicly — is a particularly effective tool for accomplishing this goal. Putin’s principal rivals are Western democracies, whose elections can theoretically be swayed by the release of damaging information. And the United States happened to be holding an election with a candidate who, at least on paper, seems likely to destabilize America’s commitment to its allies and cozy up to the Kremlin.

To analysts like Nexon and Polyakova, the takeaway is clear: Even though there was a chance the US might retaliate, Russian leaders likely concluded that intervening to help Trump was worth it.

“Putin is willing to take increasingly bigger risks to strategically place Russia as a [great] power in the world again,” Polyakova says. “I think it’s the Kremlin’s attempt to balance the security asymmetry that currently exists.”

If this analysis is correct, then don’t expect Russia to stop with the US election. Both France and Germany are holding national elections in 2017; both of them feature far-right candidates who support a less hostile stance to Russia than their opponents. If Russia’s information operation worked in America, there’s no reason to think the Russians wouldn’t try it with two of their other leading rivals — or, for that matter, in a future US election.

“If you can divide [Western countries], even in a half-assed way, that’s good,” Nexon says. “If you can get people elected who look like they might rip up [institutions like NATO] on their own, that’s even better.”