The triumphant end to the Somali pirate crisis let President Barack Obama sail unscathed out of a tricky political squall and may have earned him early stripes as US commander-in-chief.
The seizure by heavily-armed pirates of US merchant Captain Richard Phillips was widely portrayed in the US media as a first test of nerve for the new president, at a time when political critics were ready to pounce.
It seemed unlikely that given the furious pace of Obama’s young presidency, the memory of the daring naval action in the treacherous waters off Somalia would linger for more than a few days and offer a lasting political payoff.
But the five-day drama did allow the president to appear cool under pressure and prudent and pragmatic in his application of military power.
Obama kept largely silent during the standoff, which ended Sunday when US Navy snipers shot dead three pirates off the Somali coast.
White House spokesman Robert Gibbs said the president decided not to inject himself into the crisis with a flurry of public appearances or ultimatums that risked offering valuable propaganda to the pirates.
"In many ways, you could be upping the ante a bit on the potential of what the pirates held," Gibbs said.
"The president always knew and always acted understanding that the protection and security of the captain was always the primary goal of any of his decisions or any of his actions."
Shortly after Phillips was rescued, the president issued a written statement praising the courage of the kidnapped skipper of the Maersk Alabama cargo vessel and the heroism of the naval personnel who saved him.
Aides meanwhile offered details of Obama’s behind-the-scenes role in the crisis, portraying him as a methodical leader.
Obama was frequently briefed on the crisis and demanded extra details and updates, aides, and disclosed that the president gave the Defense Department authorization to use military force in the crisis in an emergency situation.
Top US Navy official Vice Admiral William Gortney told reporters that Navy snipers had recieved standing orders from Obama to use force to save merchant Captain Phillips if he faced "imminent danger."
Had the crisis dragged on longer however, it is clear Obama would have faced escalating domestic pressure — and could have encountered a full-blown crisis had Phillips been killed by his captors, or in a botched rescue bid.
Obama’s critics were already carping that the spectacle of a handful of pirates holding a US sea captain to ransom in the shadow of heavily armed US warships was a slight to US power.
Though on a smaller scale, the pirate showdown recalled the fierce political backlash against rookie president Bill Clinton in 1993 when 18 US soldiers were killed in Somalia, a story made into the movie "Blackhawk Down."
Before news broke of the rescue on Sunday, former US House of Representatives speaker Newt Gingrich took exception to the way the crisis was being handled by the White House.
"We have the most powerful navy in history, we have the capacity to police the area if we want to, we have an entire NATO alliance which has total navy dominance in the region," Gingrich told ABC News.
"Nobody has the will to do anything. We ought to simply, as a civilized world, say we are going to stop the pirates in the region. Period."
A less successful outcome would surely have exposed Obama to claims by critics that he was not comfortable wielding US military power.
The president did not address the crisis in public until a visit to the US Department of Transportation in Washington on Monday.
"We are going to have to continue to work with our partners to prevent future attacks," Obama said.
"We have to continue to be prepared to confront them when they arise and we have to ensure that those who commit acts of piracy are held accountable for their crimes."
His comments raised the question of how exactly the president intended to carry through his words, a question Gibbs left unclear.
Defense Secretary Robert Gates said in Quantico, Virginia, that there was no pure military solution, citing the political tumult in Somalia.
"I am confident we will be spending a lot of time in the situation room over the next few weeks trying to figure out what in the world to do about this problem," said Gates.