The successful resolution to the five-day pirate hostage drama set off a flurry of triumphant chest-puffing headlines across the American media, with Barack Obama winning praise for an "early military victory" in his presidency. It was an important test for the US leader, derided by his critics as a soft-talking ingénue commander-in-chief. Had the rescue operation been bungled, the damage to his reputation would have been immense, as his Democratic predecessors can personally attest.
Jimmy Carter never recovered from Operation Eagle Claw, the doomed attempt to rescue 52 American hostages from the US embassy in Tehran in 1980 that ended with eight military deaths.
Bill Clinton came undone in the very arena where Mr Obama prevailed. His disastrous bid to track down the warlord Mohamed Farah Aideed in Somalia in 1993 saw 18 US troops killed, with corpses dragged through the streets of Mogadishu – an episode dramatised in the film Black Hawk Down.
Mindful of these lessons, President Obama played a canny game, almost downplaying the crisis by making no public remarks while events were unfolding in the Indian Ocean. Behind the scenes, he talked to military chiefs, received 17 briefings, and at 8pm on Friday gave the order to use force if the hostage's life was in danger.
Even when Richard Phillips had been freed, there was no victorious appearance before the cameras, just a written statement saluting the captain's courage and US Navy's bravery. The Obama administration has already ditched GWOT (Global War on Terror) from its lexicon, and, significantly, the President did not lump the Somali hostage-takers, out to make a quick buck, with traditional "terrorists".
However, the US President should not sit on his laurels. The American hostage rescue may have succeeded, but Somalia is a deteriorating failed state. And one which will not go away any time soon. Al-Shabaab, the radical Islamic group that claimed responsibility for yesterday's mortar attack, controls vast swathes of the country. It is allied to al-Qa'ida, and Osama bin Laden recently issued a rallying cry to the Somali people to topple President Sheikh Sharif Ahmed, the moderate head of the three-month-old government.
At the end of this latest crisis, Mr Obama pledged to help end the scourge of piracy, but he made no mention of the onshore lawlessness. And as long as instability persists on land, there will be no end to the maritime menace.
Claire Soares is deputy foreign editor