A laconic announcement from Russia’s TASS news agency on February 16 said that Belarusian and Russian ministers had “agreed [on] the protocol” for new oil and gas prices. Nothing unusual in that, it would seem. The two countries are after all close allies, and indeed partners in a so-called union state that dates back to 1996.

Except that in the last year, Moscow and Minsk have been engaged in a series of spectacular and increasingly public rows. Russia has cut crude-oil exports to Belarus and demanded that Belarus pay a higher price for its gas. Hundreds of millions of dollars are at stake. The Russians have also said they are setting up new security zones on the two countries’ common border and that the Federal Security Service (or FSB, the domestic successor to the Soviet-era KGB) will monitor the frontier. This is in response to Belarus’s decision to offer free visas to citizens of 80 countries, including many Western nations that are imposing sanctions on Russia. Since the Western sanctions regime on Russia was instituted in 2014, Belarus has profited from being an entrepôt for European goods that are formally banned in Russia.

Belarus needs the money. An unprecedented series of street protests in several towns over the weekend of February 18–19, inspired by socioeconomic grievances, suggests that Belarusian President Alexander Lukashenko knows his regime needs to keep adapting if it is not to crumble.

Lukashenko may still look and sound like the rough-cut collective-farm director that he once was, but he should not be underestimated. Having been in power since 1994, he has become Europe’s ultimate survivor and deal maker. He tries to keep his options open with the EU while not allowing Russia to take him for granted.

Occasionally, Moscow must be reprimanded. In an extraordinary seven-hour press conference on February 3, Lukashenko repeatedly lashed out at Russia and growled, “Why grab us by the throat?” As Artyom Shraibman noted recently for Carnegie.ru, a central message of the marathon performance was the claim—made by naive or pretend-naive Russians for centuries—that Russia is run by a good czar and bad advisers. Lukashenko castigated Russian ministers and Kremlin advisers for the failing relationship between the two countries while conspicuously absolving Russian President Vladimir Putin of any blame. If that was the tactic, then the announcement of a forthcoming oil-and-gas deal indicates it may have worked.

There has been some rather fevered speculation that Belarus could be the next Ukraine as Lukashenko lurches toward the West and Putin moves to crush him. This is completely far-fetched. Lukashenko’s authoritarian model gives him no real traction with the West and will always keep his regime closer to Putin’s Russia. But, as he told journalists, he does not believe in “flying on one wing.”

The Belarusian leader’s calculated acts of disloyalty to Moscow and assertions of independence—as well as gestures such as the visa announcement or the freeing of political prisoners—give him some leverage with the European Union. That becomes a more urgent priority as the once-resilient Belarusian economy has begun to decline. GDP fell by 3.9 percent in 2015 and by 2.6 percent in 2016, causing the discontent that now manifests itself, at a low level thus far, on the streets.

Lukashenko’s balancing act—you could call it giving himself elbow room—is made easier by the unprecedented goings-on in Washington and the complete confusion emanating from the White House as to what currently constitutes U.S. foreign policy.

In his press conference, Lukashenko compared himself with the U.S. president, with whose authoritarian populist style he evidently feels an affinity. In one of the more Trumpian passages, Lukashenko mused, “Yes, [U.S. President Donald Trump] is inexperienced. Yes, he should be a bit calmer, but that’s just how it looks from here. . . . I went through all that myself, as a man who rose from outside the elite. But he has lots of clever people around him! Eighty percent of them are Jews, and you won’t say that they are stupid.”

Lukashenko is not the only one playing this game. Perhaps he was encouraged by the way Czech President Miloš Zeman, who shares Trump’s hostility to refugees and Muslim migrants, was rewarded with a friendly telephone call and an invitation to the White House. In the ring of countries that are neighbors of Russia but not members of NATO or the EU, the leaders of Azerbaijan, Kazakhstan, and Moldova play the same balancing game in different ways. It is probably no coincidence that Lukashenko’s relations with Azerbaijan have warmed in recent times, to the detriment of ties with Armenia.

A few days after Lukashenko’s press conference, Alexander Lapshin, a blogger who was extradited from Belarus to Azerbaijan, was charged with having illegally reported from the Armenian-controlled territory of Nagorny Karabakh, which is de jure part of Azerbaijan. The extradition was for an offense that would normally have occasioned at most a denial of a journalist’s visa to Azerbaijan for having visited a separatist territory without permission from Baku. The high-profile extradition, broadcast on television, was met with fury from Armenia and angry words from Russia, whose citizen Lapshin is (as well as less audible discomfort from Azerbaijani ally Israel, whose citizenship Lapshin also holds).

Russia will not suffer from this row, but Lukashenko’s favoring of Azerbaijan over Armenia shows his lack of interest in the supposed solidarity of nations in the Eurasian Economic Union and Collective Security Treaty Organization, of which Armenia, but not Azerbaijan, is a member.

This is the geopolitics of every man for himself, exacerbated by Trump’s takeover of the White House, which hurts not only the West’s alliances but Russia’s as well.