There are four reasons why Vladimir Putin unleashed his surprise military intervention on Syria last year.

The first is that he’s a menacing dictator desperately clinging to power, and with the Russian economy stagnating thanks to low oil prices, he needed a way to rally his people around the flag—and himself.

The second reason is he believed a show of military strength was necessary to reestablish Russia as a global player. After years of Putin essentially being sidelined while America invaded Iraq, which he opposed, and Russian neighbors like Latvia and Estonia being ushered into NATO, which he fears, he decided it was time to force the world to acknowledge his (precarious) strength.

The third reason is that Russia has military and economic interests in Syria, including a naval base in the coastal city of Tartus.

The fourth reason is the most surprising and, oddly enough, the most pro-American. It has to do with President Obama’s boneheaded decision to arm the rebels and position America against Bashar al-Assad in Syria. "The Russians intervened in Syria in order to bail the United States out of a very difficult situation," writes George Friedman. The White House, he argues, was sandwiched between two imperatives: it could no longer countenance the destruction of the regime, but it also couldn't explicitly side with Assad. "The Russian intervention solved the problem for the United States," Friedman concludes.

Friedman makes it clear he’s not suggesting that a quid pro quo occurred between the West and Russia—you shore up Assad and we’ll help you later on—but he does think Putin, in a twisted way, performed a service for the United States by demonstrating that the regime is still a viable force and bringing it to the negotiating table.

The toppling of Assad’s government has become an intolerable outcome, one that would create another opening for ISIS, empower a rebellion that has al Qaeda at its core, and put at risk millions of Alawites and other Western Syrians who have been protected by the regime. The only solution in Syria is a political one, specifically the ongoing peace talks in Geneva, something the White House seems to finally understand. But after years of betting on the rebels, the United States couldn’t simply jump over to Assad’s side and demand that he be included. It was the Russian intervention that reestablished Assad as a formidable player in the Syrian Civil War, without winning the conflict for him or even retaking the city of Aleppo.

Now, with the Russians and the Iranians picking up and leaving, Assad’s government will be forced to negotiate, which is exactly what the United States wants.

If nothing else, Russia’s involvement should reinforce the absurdity of our initial plan to vault the Syrian rebels over the top. Buoyed by the Arab Spring, President Obama thought he could push Assad aside and establish a democracy in the capital of what was a flourishing Islamic empire. To that end, he ignored the rebellion’s metastasizing jihadism and, along with reckless Saudi Arabia and Qatar, pumped weapons into Syria that ended up in the hands of ISIS. An offer by Russia in 2012 for Assad to step aside was ignored—Obama was too busy gambling on Syria’s future. By the time he grasped that there were threats in Syria more sinister than Assad, it was too late.

It took a topless Russian equestrian to save Barack Obama from the mess in which he entangled himself. That’s not an endorsement of Putin; its another indictment of this administration and its ill-considered Syria policy.

Matt Purple is a fellow at Defense Priorities and deputy editor at Rare Politics.