How many ironies can you fit into one foreign policy crisis? Many, if you are Barack Obama confronting the rapidly developing insurgency in Iraq.
The President this weekend appeared to be on the verge of ordering air strikes in a country from which he has worked tirelessly to extract the United States. If he does take action, he could wake up and find that Iran is his new best friend. Also, he could intervene without first consulting Congress, because the 2002 law that authorised George W Bush to invade Iraq – and which Mr Obama has repeatedly condemned – is still in effect. That is suddenly convenient.
At least the crisis gives Mr Obama a degree of leverage over the Iraqis that he hasn't had for a long time. On Friday, he referred, without offering detail, to occasions in the past when the US has secretly offered help to the government of Nouri al-Maliki only to be rebuffed. So now you need us? The price of US assistance, he said, is Mr Maliki finally reaching out to his Sunni foes.
But this is a lousy hand for Mr Obama. Even though it was only in April that Mr Maliki forged a new coalition after elections, there is no guarantee he has the standing in Iraq today to bring about the quick political reconciliation that Washington seeks. As problematic is propping up a military that has shown itself to be virtually beyond rescue.
The despair over Iraqi soldiers fleeing their posts is particularly deep given how much the US has spent training them. "We were surprised and disappointed by the poor performance of some of the Iraqi forces units up there in the north," Rear Admiral John Kirby, the Pentagon press secretary, conceded.
Domestically, it's a crevasse, too. Withdrawing from Iraq and, by 2016, from Afghanistan had until last week stood as possibly the only two intact planks of a splintering foreign policy legacy. Every synapse in Mr Obama's brain is urging him to pretend this isn't happening. But if he doesn't act he could be the president who let Iraq become the breeding ground for jihad extremism.
Already, Mr Obama runs the risk of being seen to be dithering. His suggestion on Friday that he will take some days to decide what to do instantly drew rebukes from Republicans. The only thing he has said with clarity so far is that he won't consider putting US troops on the ground. That is an easy political calculation. Popular opposition in the US would be enormous.
His critics say he has been taken by surprise. "This threat has been growing for months, and Iraqis have been asking for assistance to attack these terrorist camps through drone strikes, which has been denied. Why has the Obama administration been taken off guard?" asked Ed Royce, the chairman of the House Armed Services Committee.
There is evidence that Congress was napping. When Defense Secretary Chuck Hagel went before a Senate hearing on Wednesday to explain the swapping of Guantanamo Bay prisoners for Bowe Bergdahl, he wasn't asked one question about Iraq over five hours. Yet the White House and the Pentagon were following events on the ground in Iraq.
Mr Obama will be hoping that the experts who are telling him that Baghdad itself won't fall to the rebels are correct. If he does order action, it will probably be stepped-up aid for the Iraqi military and attacks on the insurgents by drones, planes or guided missiles.
The President will be all too aware that those who accuse him of having pulled out troops from Iraq too early are, in many cases, the same people who urged the US to go into Iraq in 2003. The ones who started the whole mess.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies