Last Wednesday morning, members of the Russian parliament broke into spontaneous applause. “Colleagues three minutes ago, Hillary Clinton admitted her defeat in U.S. Presidential elections, and just this second Trump began his speech as President-elect," a Duma deputy named Vyacheslav Nikonov announced. The hall was filled with a long and sustained cheer. Vladimir Zhirinovsky, the nationalist buffoon who is a particularly vulgar yet ultimately feckless Russian version of Trump, threw a party with champagne in his Duma office. Not long after, Vladimir Putin sent Trump a telegram of congratulations, saying that he welcomed a “constructive dialogue” with the new U.S. President, based on “principles of equality, mutual respect, and genuine consideration.”

For Putin, Trump’s victory is an extraordinary turn of events. It wasn’t just that Trump had spoken admiringly of Putin, and that he appeared to share his basic calculus of power, in which force is what matters, and neither the law, nor the media, nor any political norm acts as a constraint on the leader and his will. Trump’s transactional sense of policy, too, which is devoid of a sense of history or normative value, led him to positions that read like Putin’s wish list: he spoke of recognizing Russia’s annexation of Crimea, called into question U.S. commitments to NATO, and dismissed criticism of Putin’s authoritarian rule. If Hillary Clinton was the embodiment of the assertive—often hubristic—strain of neoliberal interventionism, then, as the Kremlin saw it, Trump was the opposite: an incurious populist prone to isolationism and short-term pragmatism. That Trump, who wasn’t expected to win, might wreak havoc even in defeat on the strength and durability of U.S. institutions was all the better. Putin famously called him yarkiy, a tricky word that means colorful, gaudy, or bright, in the way that the neon lights shine from the marquee of one of Trump’s casinos. Trump received hagiographic coverage in Russian state media, which painted him as a heroic iconoclast going up against a rigged American system. That message was for Russian audiences, not American ones, meant to prop up the image of an external enemy in the form of Obama and Clinton, the inheritor of the status quo.

Trump as President is a different matter. The last weeks before the vote were telling: the tone of Russian state media shifted, and news sources did not praise Trump so much as relish the foul state of the election, throwing a pox on everyone’s house. The country’s most bombastic television host, Dmitry Kiselyov, declared the U.S. campaign so “horribly noxious that it only engenders disgust toward what is still inexplicably called a ‘democracy’ in America.” The victor will be a lame duck from the start, he declared. “Threat of impeachment will hang over whoever wins the White House.” It could be inferred that the Kremlin was preparing for the enemy it knew, and only hoped she would enter power as weakened and distracted as possible.

Now Moscow is trying to figure out what Trump will actually do while in power. “Does he mean what he says?” Sergey Rogov, the director of the Institute for U.S. and Canadian Studies, a state research center that developed arguments for détente during the Soviet era, said. “Is Trump serious about improving relations? Russian officials hope he is, and so do I—but how could we really know?”

It is hard to imagine that Trump will push Moscow hard about Ukraine, where Russia has supplied arms, money, diplomatic cover, and Army soldiers to prop up separatists in the rebel-held east. Given Europe’s waning interest, Kiev will be more alone than ever. (The government of Petro Poroshenko may have to finally get serious about confronting the country’s real enemy: a corrosive oligarchy and unchecked corruption.) Regarding the rest of the region, Trump’s skeptical statements about NATO unnerve leaders in the Baltic countries and Eastern Europe. It’s not that Russia has territorial designs on those states—at least, not for the moment—but any provocations meant to test NATO’s security guarantees are less likely to face resistance when the alliance’s largest military is led by a man who wonders aloud about the whole point of the thing. In Syria, Trump’s preference for a bomb-first approach that elevates the danger of the Islamic State above the horror of Bashar al-Assad is nicely suited to Putin’s own policy there. More broadly—and perhaps most important for Putin—Trump’s alpha-male fondness for Putin, combined with his self-professed willingness to make a deal on just about anything, suggests that he is willing to see the world as Putin does: a Second World War map waiting to be divided up between the great and powerful, in the manner of Roosevelt and Stalin at Yalta.

Yet Putin must surely be worried about exactly what he is getting in the next U.S. President. Alexei Venediktov, who is the editor of Echo of Moscow, a liberal radio station, and who has extensive contacts in the Russian élite, told me a story about Putin’s reaction to the Brexit vote, last June. The word in Moscow was that, by creating a crisis for E.U. unity, Brexit was a positive thing for Russia. “A part of our political establishment was celebrating the result, congratulating one another,” Venediktov said. “But at the first foreign-policy meeting that Putin led that morning, he told them, roughly speaking, ‘What’s wrong with you, have you gone crazy? Economic turbulence in Europe will now hit us, too. What have we won?’ ”

Not long ago, I spoke with Vladimir Yakunin, the former head of Russia’s state railways, and a member of Putin’s inner circle dating back to the nineteen-nineties. He told me that the rise of Trump “shows that, in a very serious way, the political establishment in your country no longer understands what’s happening inside its own system”—a development that he considered “very dangerous, seeing as the stability of the global political system largely depends on the stability of the American political system.”

Putin rules a country that, on paper, is no superpower. His advantage has been his boldness as the unpredictable rule-breaker in a club of rule-followers—he did what he felt like doing, while Obama and European leaders were boxed in by their quaint notions of norms in international relations and concerns over global stability. He may soon lose his singular claim to that title. Earlier in the campaign, Timothy Snyder, the historian and author, pointed out that Trump, the inveterate con man, had reason to envy Putin—“the real world version of the person Trump pretends to be on television.” The truth, however, may be darker: What if it turns out that Putin is the tactician and bluffer, who only plays the lunatic, and the real strongman, volatile and impulsive, is Trump?