Lesson number one for Russia’s neighbors is that your existence can be interrupted at any moment at the whim of the Kremlin. Lesson number two is that Russian intervention is always to your disadvantage.

It may be that a July 6 explosion at Kazakhstan’s enormous Tengiz Field, the sixth-largest in the world with reserves estimated at 3.2bn tons, was an accident. And it may be a coincidence that two days earlier, Kazakhstan’s President Kasym-Zhomart Tokayev, made a series of statements about plans to increase oil supply to Europe from the Tengiz field. It’s possible too that on July 6, a Russian court ordered the Caspian Pipeline Consortium (CPC), a major exporter of oil from Kazakhstan, to suspend operations for 30 days due to “irregularities in paperwork guiding elimination of oil spill emergencies.” (The decision was apparently reversed on July 11.)

Taken together, however, Kazakhs will reasonably conclude that the Kremlin is expressing its displeasure at signals of independence from a country whose importance to Russia was underlined just six months ago when troops arrived to quell a popular uprising. The Kremlin views its oil-rich neighbor as a key interest and it forms an important part of Russia’s international network of thievery.

Putin might well, therefore, have expected the country to do his bidding when he launched his war of aggression against Ukraine. But to widespread surprise, Kazakhstan rejected Russia’s request for Kazakh troops to join the campaign and refused to recognize the Kremlin’s two puppet republics in Eastern Ukraine. (This was welcomed by the United States and the National Security Council issued an approving statement.)

Worse was to come, at least from Putin’s point of view. Just before Russia’s showpiece annual St Petersburg International Economic Forum on June 17, Tokayev told Russia’s Rossiya-24 TV channel that Western sanctions against Russia would be respected. “Sanctions are sanctions, we should not violate them, especially since we receive notifications that if sanctions are violated, so-called secondary sanctions from the West will follow on our economy,” he said.

These were not mere diplomatic faux pas. The St Petersburg Forum is a prestigious event for the Kremlin where it has an opportunity to demonstrate its economic and diplomatic clout. It is not the place to show disrespect to the Russian leader.

Yet that’s exactly what he did. Responding to a Kremlin-approved question from its chief propagandist, the head of RT, Margarita Simonyan, the Kazakh leader said that he did not recognize “quasi-state formations” in the Donbas. “In general, if the right of nations to self-determination is realized throughout the globe, then instead of 193 states that are now members of the UN, more than 500 or 600 states will arise on Earth. Naturally, it will be chaos. Therefore, we do not recognize Taiwan, Kosovo, South Ossetia, or Abkhazia [the last two occupied by Russian troops]. This principle will be applied to quasi-state associations, which, in my opinion, Luhansk and Donetsk (the so-called DPR and LPR) are,” he said.

Putin was visibly shaken and stumbled when giving his immediate response. At the same meeting, Tokayev also criticized Russian politicians and commentators, whom he accused of “sowing discord” between the two countries by launching public attacks on Kazakhstan.” His office then let it be known that he had refused Russia’s offer to award him the Order of Alexander Nevsky.

Putin was clearly angered by Tokayev’s words because the next day Russia (again) announced the suspension of Kazakh oil shipments from the CPC in Novorossiysk. According to Kommersant, authorities had discovered more than 50 previously unknown unexploded World War II munitions near the terminal where the oil pipeline from Kazakhstan ends.

Russian media meanwhile went into overdrive with attacks and threats aimed at Kazakhstan. Lawmaker Konstantin Zatulin said Tokayev had “challenged” Putin and said this could result in an invasion to (predictably) protect the Russian minority and annex territory. “There are many towns with a predominantly Russian population that have little to do with what was called Kazakhstan,” Zatulin told Radio Moskva.

“I’d like Astana [the old name of the Kazakh capital, Nur-Sultan] not to forget that with friends and partners, we don’t raise territorial matters and don’t argue. As for the rest — like, for example, with Ukraine – everything is possible,” he said.

Days after the explosion and suspension of the Caspian pipeline, Tokayev announced that Kazakhstan was withdrawing from the 1995 Commonwealth of Independent States Agreement on the Interstate Monetary Committee, a scheme to enhance credit and currency exchange.

Kazakhstan’s leader may not be too perturbed about Russian foot-stamping at the moment. His country’s response to threats against its oil outlets was to say it would use alternative routes, and it can retaliate in various ways, including halting Russian coal freight movements across its territory. At a time when the Kremlin is stripping troops from every military outpost to reinforce its bloody war in Ukraine, its military menace may seem limited.

Russian leaders are visibly enraged at the moment, and not just towards Kazakhstan. Over the past several weeks, Russia’s former President and premier, Dmitry Medvedev, has issued a series of threats to the country’s neighbors, NATO, and the US. Russian politicians trip over themselves to make provocative statements and issue threats — Russian Duma speaker of the lower house, Vyacheslav Volodin, even threatened to take back Alaska if the United States froze or seized Russian assets.

Right now, however, Kazakhstan has no need to bend the knee to Putin. It is clear that Russia is desperate to have neighbors do as they’re told, and equally clear that it lacks the power to make them.

Olga Lautman is a non-resident senior fellow at the Center for European Policy Analysis (CEPA), the host of the Kremlin File podcast , and an analyst/researcher focusing on Russia, Ukraine, and Eastern Europe.