By Matthew Davis
BBC News, Washington
President Bush had sailed full steam ahead into a political iceberg in the shape of the bitter row over the management of US ports by a Dubai-owned company.
Mr Bush was accused of being tone deaf to the politics of the deal
Yet at the last minute he found an unexpected seat on a lifeboat.
On Thursday, Dubai Ports World bowed to the ferocious Congressional opposition to its deal to take over the running of six major ports, announcing it would transfer the planned operations to a US entity.
The news came hours after key Republicans broke with the president and voted to block the deal.
For Mr Bush - who had threatened to veto such legislation - DPW's decision means he avoided having to make one of the toughest political choices of his time in office, at a time when his approval ratings are plumbing new lows.
Would he have fought on against prominent members of his own party and public opinion, or would he have given in and accepted defeat with all the loss of authority that would entail?
While he has been handed an exit strategy, he has not dodged the fallout from the row.
'Passion hid facts'
Throughout his five years in office, Mr Bush's strength has been anchored by his standing on matters of national security.
Yet in the space of a few weeks he has found himself cast adrift from his own party and the country on this signature issue.
The whole argument over the ports deal has been highly charged - emotionally and politically.
Some say passions in the debate overwhelmed the facts, and that the facts supported going forward with a deal that some of the most senior defence officials in the US said represented no threat.
But it is a row that has fed on broader concerns among Americans about terrorism, the war in Iraq, illegal immigration and foreign encroachment.
Or as one lawmaker put it: "All things Middle Eastern."
Constituents are said to have inundated Congressional phone lines and mail boxes objecting to the deal. Polls suggested more than two-thirds of Americans thought the president's position was wrong.
Some, especially on the left of the political spectrum, raised uncomfortable questions over the Bush family's ties to the United Arab Emirates.
On Capitol Hill, many Republican critics said the administration was "tone deaf" to the politics of the deal.
Just months away from the mid-term elections there was anger that the president's position was allowing Democrats to gain ground on a national security issue - where Republicans are traditionally politically strong.
In a memo distributed to Democratic senators, leading pollster Mark Mellman wrote: "With huge majorities opposing the president's proposal to sell control of US ports to Dubai and the failure of the president's Iraq policy, the Republicans' once-yawning advantage on security issues has been largely neutralised."
The row also came at a time when the president is at odds with Congress on other issues.
On Wednesday Mr Bush bluntly accused lawmakers of "short-changing" New Orleans, saying they had been slow to provide funding for housing and levee repairs.
Republicans in the Senate are also wrestling with how hard to press the White House for more authority over the president's warrantless eavesdropping programme.
Politicians opposed to the DPW deal said they wanted more time to study the announcement before deciding whether they were satisfied.
Congressman Pete King, one of the Republicans who have split with the White House to oppose the Dubai company, said only a full break would be acceptable.
"It would have to be an American company with no links to DP World and that would be a tremendous victory", he said.
Whether it is a victory with serious long-term consequences for the authority of President Bush remains to be seen.
Dr James Carafano, a leading defence analyst at the Heritage Foundation, told the BBC: "You take your licks and you fight another day.
"This is not the last hit the administration will take. The last time I checked there were three years left in the term.
"But many people are disappointed that a second term administration has made a sophomore political mistake.
"They really dropped the ball on this, and it is more frustrating because in security terms it is a non-issue."