Russian President Vladimir Putin arriving for a meeting with businessmen on the sidelines of the Russia-ASEAN summit in Sochi, Russia, on May 20. Reuters The US attack on an airfield believed to have been used by Syrian President Bashar Assad's military to launch a deadly chemical-weapons attack early last week has given Russia a renewed purpose for staying mired in a war that remains popular at home while allowing Moscow to paint itself as a foil to US "aggression."

It has also allowed US President Donald Trump to deflect criticism that he is overly beholden to Russia and insensitive to Assad's brutal, scorched-earth campaign against Syrian civilians and rebel groups.

Both Russia's president, Vladimir Putin, and prime minister, Dmitry Medvedev, have doubled down on their support for Assad — condemning US "aggression" against what they view as Assad's "legitimate" government — since the US targeted Shayrat airfield with 59 Tomahawk cruise missiles last week.

Dmitry Peskov, Putin's spokesman, told reporters last week that it was "indisputable" that the US strike on Syria "was carried out for the benefit of ISIS and other terrorist organizations." Medvedev said on Facebook that Trump "proved" he would "fiercely fight the legitimate Syrian government" instead of against "the biggest enemy, ISIS."

The strike has provided fodder for Moscow, which has been given a clean slate to continue to paint the Syrian conflict as a binary and two-dimensional fight between a legitimate government, supported by Russia, and "terrorists," supported by the US.

(Moscow and Damascus have long used the word "terrorists" to describe a range of actors opposed to Assad, from moderate rebel groups fighting for regime change to terrorist groups like Al Qaeda and ISIS, whose goal is to establish a pan-Islamist caliphate.)

That narrative, which had been fueled by the Obama administration's limited but overt support for various rebel groups opposed to Assad, has allowed Putin to garner popular domestic support for the war effort. Less than 20% of Russians think the war doesn't make sense, according to The New York Times. And it has provided a distraction from the country's protracted economic stagnation.

Putin with Syrian President Bashar Assad at the Kremlin in Moscow in 2015. AP

As the Associated Press reported last year, Russia's intervention in Syria "at little cost" had "demonstrated Russia's might, turned the course of the war, and made sure that Russia is once again treated as a world power on a par with the United States." Russia's help in winning back Syria's largest city, Aleppo, from the opposition added to Russians' perception of the intervention as one worth their time and money.

Whereas the US was meddling in the affairs of a sovereign state to bolster extremists, the messaging went, Russia was fighting terrorists with Assad's blessing.

As The Guardian's Martin Chulov wrote on Monday, there is still "no mood in Moscow to concede any ground on Syria to the US – and a calculation that Rex Tillerson," the US secretary of state, "won't be pushing too hard anyway."

Putin and Iranian President Hassan Rouhani — also a staunch Assad ally — agreed on "the inadmissibility of aggressive US actions against a sovereign state in violation of international law" in a call Sunday.

The joint command operation center of Syrian allies, a group that includes Russia and Iran, characterized the US as an "occupying force" in a separate statement later that day.

"Rest assured that we will liberate Syria from all kinds of occupying forces, it does not matter from where they came to the occupied part of Syria," the group warned in a statement. "Russia and Iran will not allow the United States to be the only superpower in world."

The use of the US as a Russian (and Iranian) foil hung in the balance as Trump campaigned on increased cooperation with both Assad and Russia against ISIS. The reality of Trump's presidency, moreover, meant the loss of a known, and convenient, Kremlin adversary in Democratic nominee Hillary Clinton.

But in launching a military response that would have been unthinkable under Obama, Trump has both renewed and emboldened Putin's sense of purpose in defending Assad and painting the US as the aggressor. It has also allowed Russia to revert to its best-rehearsed, and most well-received, talking point: The US is an imperialistic actor with an impulsive leader whose loyalty lies not to his people but with "the establishment."

"This military action is a clear indication of the US president's extreme dependency on the opinion of the Washington establishment, the one that the new president strongly criticized in his inauguration speech," Medvedev wrote on Facebook.

"Soon after his victory, I noted that everything would depend on how soon Trump's election promises would be broken by the existing power machine. It took only two and a half months," he added.

The attack was ordered as investigations by the FBI and the House and Senate intelligence committees into Trump's ties to Russia were reaching a boiling point in the media. Those who had been frustrated by the continuing investigations felt vindicated by the strike, which they saw as evidence that Trump was not beholden to Putin or Moscow.

Trump, meanwhile, was heaped with bipartisan praise for standing up to Assad. Syrians, too, rejoiced that Assad was finally being held accountable for six years of barrel bombings and gas attacks against his own people.

While the strike has put Assad and Putin on notice, however, analysts say expectations that the US will wage a longer-term challenge to Russia's influence in Syria is premature.

Trump "has taken an important first step in repairing the damage, but this will not be the end of the story," Robert Kagan, a senior fellow at the Brookings Institution and former State Department official, wrote last week.

"America's adversaries are not going to be convinced by one missile strike that the United States is back in the business of projecting power to defend its interests and the world order," Kagan added. "The Russians, by suspending an agreement with the United States to coordinate air operations over Syria, are already implicitly threatening to escalate in Syria."

Vladimir Frolov, a foreign-affairs analyst, told The New York Times last week that while "there will be many screams on the Russian television with people condemning the strikes ... everybody understands that this is just a symbolic act meant for Trump to look different from Obama."

"There won't be any tangible reaction," he added. "This was a one-off strike."