The US Senate voted overwhelmingly on Wednesday to override Barack Obama's veto of a bill allowing 9/11 victims to sue Saudi Arabia, the first such rebuke of his eight-year presidency.
In a landmark 97-1 vote backing the override, only outgoing Obama ally, Nevada Democrat Harry Reid, voted against it, teeing up a similar vote in the House of Representatives later Wednesday.
The rare act of bipartisanship is a severe blow to Obama, who lobbied hard against the bill, known as the Justice Against Sponsors of Terrorism Act (JASTA).
The rebuke marks Obama's last months in office and shows the White House to be much weakened.
Obama has issued 12 vetoes during his presidency. Until now none have been overridden, a rare feat given Republicans' longstanding control of Congress.
His Republican predecessor George W Bush also issued 12 vetoes and four were overriden. The last president to avoid an override was legendary Democratic congressional dealmaker -- and former senator and congressman -- Lyndon Johnson.
The White House argued the 9/11 bill would undermine the principle of sovereign immunity and open up the United States itself to lawsuits.
In a letter to Republican and Democratic Senate leaders obtained by AFP, Obama said: "I strongly believe that enacting JASTA into law would be detrimental to US national interests."
Obama warned of "devastating" consequences for the Pentagon, service members, diplomats and the intelligence services.
It would "neither protect Americans from terrorist attacks, nor improve the effectiveness of our response to such attacks," he warned.
"The United States relies on principles of immunity to prevent foreign litigants and foreign courts from second-guessing our counterterrorism operations and other actions that we take every day."
Families of 9/11 victims have campaigned for the law -- convinced that the Saudi government had a hand in the attacks that killed almost 3,000 people.
Fifteen of the 19 hijackers were Saudi citizens, but no link to the government has been proven. The Saudi government denies any links to the plotters.
Declassified documents showed US intelligence had multiple suspicions about links between the Saudi government and the attackers.
"While in the United States, some of the 9/11 hijackers were in contact with, and received support or assistance from, individuals who may be connected to the Saudi government," a finding read.
The bill's cosponsor, New York Democrat Chuck Schumer, told senators it "would allow the victims of 9/11 to pursue some small measure of justice."
Behind the scenes, Riyadh has been lobbying furiously for the bill to be scrapped.
A senior Saudi prince reportedly threatened to pull billions of dollars out of US assets if it becomes law, but Saudi officials now distance themselves from that claim.
The US-Saudi relationship had already been strained by Obama's engagement with Saudi's foe Iran and the July release of a secret report on Saudi involvement in the attacks.
Senators Chuck Schumer (left), Richard Blumenthal (centre) and John Cornyn speak after the Senate voted to override President Barack Obama's veto of a bill that would allow lawsuits against Saudi Arabia's government over the September 11 attacks, in Washington on Wednesday.