President Donald Trump pissed off America's closest European allies by exiting the Iran deal and reimposing economic sanctions on the Middle Eastern power. Germany media described it as “slap in the face,” France's foreign minister called the new sanctions “unacceptable,” and Europe's top leaders looked on with “regret and concern.” Russian financial markets, on the other hand, had a different reaction: cha-ching! Trump’s decision to exit America from the Iran deal, formally named the Joint Comprehensive Plan of Action, pushed up the price of oil — Russia’s key export — to a three-year high. Russia’s ailing national currency, the ruble, jumped too, rallying more than any other national currency on Thursday just days after Trump made the much-anticipated decision official.

Though Russia has vowed to stay in the deal along with China and its European partners, Trump’s decision was undoubtedly good news for Moscow's sluggish economy, at least in the near term. Russia depends greatly on the price of oil, thanks to its status as the world’s second-biggest crude exporter after Saudi Arabia.

“This [the Iran decision] is definitely good for economies like Russia, Saudi Arabia, and other major oil-based economies,” said Ellen Wald, a consultant and expert on oil and geopolitics.

Michael McFaul, Former U.S. ambassador to Russia, noticed the correlation immediately.

Sweet relief

Iran is the third-biggest oil producer in the international crude-exporters’ cartel known as the Organization of the Petroleum Exporting Countries, aka OPEC. So fresh U.S. sanctions could severely limit Iran’s ability to supply oil to global markets. If so, tighter supply would mean firmer prices — increasing Russia’s haul from its global oil sales.

This new dynamic couldn’t come at a better time for Putin, who on Monday vowed to make restoring Russia’s economy a top priority. In a speech launching his fourth term as president, Putin promised economic reforms and more spending on healthcare and infrastructure.

Now, higher oil prices give Putin more financial firepower to realize those goals.

Of course, they also provide an economic cushion that reduces the immediate incentive for him to make any painful reforms, a conundrum Russian economic planners have long grappled with, said David Szakonyi, a professor studying Russian affairs at George Washington University.

“Higher oil prices provide an infusion of money into state coffers that will allow the Kremlin to tackle some big domestic priorities,” Szakonyi told VICE News. “This is a huge upside to them. At the same time, it also slows down plans to diversify the economy.”

Fool's gold?

Putin also has to wrestle with the new reality of constant, and apparently crippling, U.S. sanctions. This past April, Trump’s White House hit Russia with a fresh round of sanctions, some of the most serious yet.

“Higher oil prices can mask a lot of economic problems for Russia.”

“Those sanctions in April had some real teeth,” said Adam Smith, a former senior adviser to the director of the Treasury Department’s Office of Foreign Assets Control and now a partner at the law firm Gibson, Dunn & Crutcher.

“That really spooked people and the broader market, because now it’s not clear what’s off-limits going forward,” Smith told VICE News.

The Treasury Department targeted powerful Russian multibillionaires close to the Kremlin in what it called a response to Russia’s aggressive foreign policy. That sent the ruble into a tailspin and plunged Russian businesses and financial markets into turmoil and uncertainty.

These rising oil prices may give Putin some cover from the weight of sanctions and an economy desperately in need of reform. But like a sugar high, the buzz might not last, unless it’s accompanied by more significant long-term reforms, analysts said.

“Higher oil prices can mask a lot of economic problems for Russia,” Wald said. “They can make Russia’s economy look like it’s doing much better, when it still has problems.”