TO HEAR Vladimir Putin, Russia has become the leader of a new global war on terrorism. By contrast Barack Obama seems wearier by the day with the wars in the Muslim world that America has been fighting for more than a decade. On September 30th Russian jets went into action to support Bashar al-Assad’s beleaguered troops. It is setting up an intelligence-sharing network with Iraq and Iran. The Russian Orthodox church talks of holy war. Mr Putin’s claim to be fighting Islamic State (IS) is questionable at best. The evidence of Russia’s first day of bombing is that it attacked other Sunni rebels, including some supported by America. Even if this is little more than political theatre, Russia is making its biggest move in the Middle East, hitherto America’s domain, since the Soviet Union was evicted in the 1970s.

In Afghanistan, meanwhile, America’s campaign against the Taliban has suffered a blow. On September 28th Taliban rebels captured the northern town of Kunduz—the first provincial capital to fall to them since they were evicted from power in 2001. Afghan troops retook the centre three days later. But even if they establish full control, the attack was a humiliation.

Both Kunduz and Russia’s bombing are symptoms of the same phenomenon: the vacuum created by Barack Obama’s attempt to stand back from the wars of the Muslim world. America’s president told the UN General Assembly this week that his country had learned it “cannot by itself impose stability on a foreign land”; others, Iran and Russia included, should help in Syria. Mr Obama is not entirely wrong. But his proposition hides many dangers: that America throws up its hands; that regional powers, sensing American disengagement, will be sucked into a free-for-all; and that Russia’s intervention will make a bloody war bloodier still. Unless Mr Obama changes course, expect more deaths, refugees and extremism.

Having seen the mess that George W. Bush made of his “war on terror”, especially in Iraq, Mr Obama is understandably wary. American intervention can indeed make a bad situation worse, as odious leaders are replaced by chaos and endless war saps America’s strength and standing. But America’s absence can make things even more grim. At some point, extremism will fester and force the superpower to intervene anyway.

That is the story in the Middle East. In Iraq Mr Obama withdrew troops in 2011. In Syria he did not act to stop Mr Assad from wholesale killing, even after he used poison gas. But when IS jihadists emerged from the chaos, declared a caliphate in swathes of Iraq and Syria, and began to cut off the heads of their Western prisoners, Mr Obama felt obliged to step back in—desultorily. In Afghanistan Mr Obama is making the same mistake of premature withdrawal. As NATO’s combat operations wound down into a mission to “train, advise and assist”, Mr Obama promised that the last American troops would leave Afghanistan by the end of 2016. The date had no bearing on conditions in Afghanistan but everything to do with when Mr Obama leaves the White House.

What can Mr Obama do? In Afghanistan, rather than pull out the 9,800 remaining American troops, he should reinforce them and make clear that he puts no date on their withdrawal. The rules of engagement must expand so that NATO forces can back Afghan ones. Attack aircraft should support them as needed, not just in extremis. He needs to knock heads together in Kabul, where the “unity” government forged last year between President Ashraf Ghani and his rival, Abdullah Abdullah, is dysfunctional enough to lack a defence minister. This was Mr Obama’s “good war”: he risks losing it.

In Syria Mr Obama’s dithering means his options continually grow harder and riskier. Mr Putin is unabashedly defending a tyrant and deepening the region’s Sunni-Shia divide. America must hold the line that Mr Assad will not remain in power, and set out a vision for what should follow. It needs to do more to protect the mainly Sunni population: create protected havens; impose no-fly zones to stop Mr Assad’s barrel-bombs; and promote a moderate Sunni force. That may well mean staring down Russian jets.

As a judoka, Mr Putin knows the art of exploiting an opponent’s weakness: when America steps back, he pushes forward. Yet being an opportunist does not equip him to fix Syria. And the more he tries to save Mr Assad the more damage he will cause in Syria and the region—and the greater the risk that his moment of bravado will turn to hubris. Given the enduring strength of America, there is much that it can still do to contain the spreading disorder—if only Mr Obama had a bit more of Mr Putin’s taste for daring.