US lawmakers voted overwhelmingly to overturn a presidential veto on a Bill allowing victims of the Sept 11, 2001 terror attacks to sue Saudi Arabia, sparking an angry reaction from the White House while raising questions about President Barack Obama's ability to deliver on the Trans-Pacific Partnership (TPP) free trade deal.
Members of Mr Obama's own party voted in large numbers on Wednesday to back a Bill he had vetoed, easily surpassing the two- thirds majority needed to approve it without presidential consent.
The Senate voted 97-1, the single vote coming from Democratic Minority Leader Harry Reid. The House vote was 348-77.
"I would venture to say this is the single most embarrassing thing that the US Senate has done, possibly since 1983," White House spokesman Josh Earnest said.
At a town hall meeting with military personnel, Mr Obama said he was not surprised by the move, even though he called it a mistake and a political vote. "If you're perceived as voting against 9/11 families right before an election, not surprisingly, that's a hard vote for people to take. But it would have been the right thing to do," he said.
Saudi experts, meanwhile, said the vote would reduce valuable security and intelligence cooperation between the United States and its key strategic ally in the Middle East.
"How can you sue a country that is collaborating against the very same terrorism that they are baselessly being accused of?" senior adviser to the Gulf Research Centre Mustafa Alani told Agence France-Presse. "Your financial investments have to be reduced in the US, your political and security cooperation has to be reduced."
There was no immediate reaction from the Saudi government. The Justice Against Sponsors of Terrorism Act (Jasta) basically creates an exception to the doctrine of sovereign immunity.
It now allows families of those who died in the 9/11 attacks to sue Saudi Arabia and for US courts to seize Saudi assets in the US to pay for those judgments. Mr Obama had warned earlier that creating that exception could cause reciprocal action overseas, exposing the US to litigation abroad.
Beyond the complications Jasta now creates in the Middle East, the decision by Congress to hit Mr Obama with the first veto override of his presidency brings into question how much political influence he still holds in the final months of his tenure.
The President still has one major piece of legislation he hopes to push through before he leaves the White House: the TPP deal.
The veto override portends a rough ride for the TPP in Congress - the deal is deeply unpopular politically right now and has taken a beating on the campaign trail.
Yet, experts say there are some important differences.
First, trade doesn't typically create a natural bipartisan consensus. Many Republicans and those in districts with influential corporations remain in favour of the deal. Second, the TPP will likely come up for a vote in the lame-duck session after the Nov 8 election, when lawmakers will not have to worry about the ballot box.
White House officials have stressed that the override would have little impact on the TPP effort.
"Despite the rhetoric on the campaign trail, the American people support expanding trade and agree with the President that high-standards trade agreements like the Trans-Pacific Partnership are good for our country," White House deputy press secretary Eric Schultz told Associated Press.