Russia, Syria’s chief ally and protector, faced a moment of truth following last week’s military strike and counter-strike in the Middle East.

On April 6, the United States fired 59 Tomahawk cruise missiles into a Syrian air force base in retaliation for a bombing raid launched by Syria on April 4 that killed 87 civilians in the rebel-held town of Khan Sheikhoun. By all accounts, their deaths were caused by sarin gas, an internationally banned colorless and odorless nerve gas discovered by three scientists in Nazi Germany in 1938.

Syria’s attack left Russia with a difficult choice to make.

Moscow could rally behind Syrian President Bashar al-Assad, who heatedly denied involvement in the atrocity. Alternatively, Moscow could distance itself from the Syrian raid and possibly achieve three overlapping objectives: improve bilateral relations with the United States and the European Union, join the U.S. in the battle against Islamic State in Syria, and end the ruinous six-year-long Syrian civil war.

Before the Syrian air raid and the swift U.S. reprisal coalesced into a crisis, Russian President Vladimir Putin sought to ease tensions with the United States after Russia’s annexation of Crimea, its covert support of separatist rebels in eastern Ukraine and its apparent meddling in the last U.S. presidential election.

In the wake of the latest events, however, Putin tilted emphatically toward Syria, Russia’s oldest ally in the Arab world.

He condemned the U.S. missile barrage as an act of aggression and a breach of international law. He claimed there was no evidence to link Syria to the chemical weapons attack, but said he would formally ask the Organization for the Prohibition of Chemical Weapons to investigate the matter. He accused the rebels of staging a provocation to exert pressure on “the legitimate Syrian government.” And he compared American accusations against Syria to faulty intelligence cited by Washington to justify its 2003 invasion of Iraq.

On an operational level, Putin ordered the immediate suspension of a military coordination channel to prevent accidental clashes between Russian and U.S. aircraft in Syria’s crowded skies. And he announced his intention to upgrade Syria’s air defence system in case of another U.S. missile strike.

Responding to Putin’s strong defence of Syria and his bitter denunciation of the United States, the Trump administration accused the Russian government of “shielding” the Syrian regime and engaging in a coverup by means of “false narratives.” And in a blistering diatribe, President Donald Trump branded Assad as an “animal.”

As this war of words unfolded, Rex Tillerson paid his first visit to Russia as U.S. secretary of state. En route to Moscow, he struck a hard line on Syria, telling a Group of 7 meeting in Italy that Assad’s days were numbered. “I think it is clear to us that the reign of the Assad family is coming to an end,” he declared, implying that Russia should sever its ties with Assad, a theme sounded by the previous Obama administration.

In Moscow, Tillerson reiterated the U.S. view that Syria — a serial perpetrator of war crimes — was responsible for the chemical attack and accused Assad of bringing Western condemnation upon himself.

Contradicting Tillerson, Russian Foreign Minister Sergei Lavrov maintained that the facts about the April 4 attack were still unclear and denounced the “media hysteria” surrounding it.

In a further rebuke, Russia vetoed a United Nations Security Council resolution critical of Syria. Sponsored by the United States, Britain and France, it condemned the Syrian air strike, urged the UN to study it and requested Syria to hand over flight logs and the names of Syrian commanders who were in charge of operations at the Shayrat air base on April 4.

Russia’s rush to defend Syria at the UN was hardly unusual. It was the eighth time in six years that Moscow had vetoed a Security Council resolution on Syria.

Russia’s defiant stance is a reflection of its deep-seated geopolitical interests in Syria and its desire to regain its influence in the Middle East after virtually losing it following the dissolution of the Soviet Union in 1991.

Russia, Assad’s chief arms supplier, regards Syria as a bulwark against Islamic radicalism of the kind espoused by Islamic State, one of the main players in the Syrian uprising. Russia has played a vital role in helping Assad turn the tide in the civil war, though the rebels still control more than half of Syria’s territory. In September 2015, the Russians significantly augmented their alliance with the Syrians by sending combat aircraft and support crews to Syria.

Syria is an important prize for Putin, as it was for a succession of Soviet leaders from the 1950s onward. Russia’s air and naval bases in Syria enable Putin to project power in the Middle East, which is relatively close to Russia’s southern border.

But is Russia’s connection to Syria ultimately more valuable than the prospect of achieving cordial and cooperative bilateral relations with the United States and its European allies?

This is a pivotal question that Putin and his advisers will seriously have to consider in the weeks and months ahead.