Congress has voted to override President Barack Obama's veto of a bill that would allow families of 9/11 victims to sue Saudi Arabian officials.
In the first veto override of his presidency, the Senate voted 97-1 and the House of Representatives 348-77, meaning the bill becomes law.
The White House described the move as "embarrassing".
The president argues the bill could expose US companies, troops and officials to potential lawsuits abroad.
CIA Director John Brennan said the vote carried "grave implications" for national security, adding: "The downside is potentially huge."
The House and Senate unanimously passed the legislation, known as the Justice Against Sponsors of Terrorism (JASTA), this year despite the Obama administration's lobbying efforts.
The bill amends a 1976 law that shields other countries from American lawsuits, allowing victims' families the right to sue any member of the Saudi government suspected of playing a role in the 9/11 attacks.
Mr Obama argued in his veto that the bill would undermine US-Saudi relations and warned of tit-for-tat lawsuits against US service members in places like Afghanistan and Iraq.
But the measure's supporters contended the legislation only applies to acts of terrorism that have occurred on US soil.
"The White House and the executive branch (are) far more interested in diplomatic considerations," said Democratic New York Senator Chuck Schumer.
"We're more interested in the families and in justice."
White House spokesman Josh Earnest told reporters afterwards the vote was "the single most embarrassing thing the United States Senate has done" in decades.
"Ultimately these senators are going to have to answer their own conscience and their constituents as they account for their actions today," he told reporters traveling with Mr Obama in Richmond, Virginia.
Mr Obama has issued 12 vetoes during the two terms of his presidency, but until now none have been overridden.
Fifteen of the 19 hijackers were Saudi nationals, but the oil-rich kingdom - a key US ally - has denied any role in the attacks, which left nearly 3,000 people dead. There is no proven link to support claims that Saudi officials provided financial support to the hijackers.
Democratic Minority Leader Harry Reid was the lone 'no' vote against the bill.
Democratic Senator Tim Kaine, Hillary Clinton's running mate, and Senator Bernie Sanders did not vote.