US President Barack Obama has called the Senate's vote to override his veto on a bill that allows families of the victims of the September 11, 2001, attacks to sue Saudi Arabia's government a mistake.

Calling it a "political vote", Obama said on Wednesday that the bill would set "a dangerous precedent" that could put US troops and interests at risk.

"If we eliminate this notion of sovereign immunity, then our men and women in uniform around the world could potentially start seeing ourselves subject to reciprocal loss," Obama said during a town hall meeting-style interview on CNN, referring to potential lawsuits.

Earlier on Wednesday, the US Congress passed into law the controversial bill that allows family members of 9/11 victims to sue Saudi Arabia for its alleged backing of the attackers.

Both the Senate and House voted overwhelmingly on Wednesday in favour of the Justice Against Sponsors of Terrorism Act, or JASTA.

"The White House and the executive branch [are] far more interested in diplomatic considerations," said Senator Chuck Schumer, a sponsor of the bill. "We're more interested in the families and in justice."

The vote was a blow to Obama and to Saudi Arabia - one of the US' oldest allies in the Arab world.

 Former senator speaks about 9/11 report

Obama, who vetoed the measure last week, said in a letter to Senate leaders on Tuesday that other countries could use JASTA to justify similar immunity exceptions to target US policies and activities that they oppose.

"If any of these litigants were to win judgments - based on foreign domestic laws as applied by foreign courts - they would begin to look to the assets of the US government held abroad to satisfy those judgments, with potentially serious financial consequences for the United States," Obama said at the time.

Obama's veto was overturned in Wednesday's congressional vote - the first override of his presidency.

Fifteen of the 19 men who carried out the 2001 attacks were Saudi nationals. Families of the victims spent years lobbying lawmakers for the right to sue the kingdom in US courts for any role elements of Saudi Arabia's government may have played.

Saudi Arabia has long denied any involvement in the attacks that killed nearly 3,000 people. Riyadh strongly objected to the bill.

Al Jazeera requested comment from the Saudi embassy in Washington but did not receive a response by the time of publication.

READ MORE: President Barack Obama vetoes 9/11 bill

Speaking after the Senate vote, White House spokesman Josh Earnest called the move "the single most embarrassing thing the United States Senate has done possibly since 1983" and "an abdication of their basic responsibilities as elected representatives of the American people".

Stephen Kinzer, a senior fellow at the Watson Institute for International and Public Affairs at Brown University, said the eight-decade-long US-Saudi relationship was "entering into a new phase".

Congressmen call for release of 9/11 report

Other analysts warned that Saudi Arabia could, in response to the law, pull billions of dollars from the US economy and persuade close allies in the Gulf Cooperation Council to scale back counterterrorism cooperation, investment, and US access to important regional military bases.

"This should be clear to America and to the rest of the world: When one GCC state is targeted unfairly, the others stand around it," said Abdulkhaleq Abdullah, an Emirati Gulf specialist and professor of political science at United Arab Emirates University.

"All the states will stand by Saudi Arabia in every way possible."

Chas Freeman, former US assistant secretary of defence and ambassador to Saudi Arabia during Operation Desert Storm, said the Saudis could respond to the law in ways that risk US strategic interests, such as permissive rules for overflight between Europe and Asia, and the Qatari airbase from which US military operations in Afghanistan, Iraq, and Syria are directed and supported.

"The souring of relations and curtailing of official contacts that this legislation would inevitably produce could also jeopardise Saudi cooperation against anti-American terrorism," he said.

Saudi Foreign Minister Adel al-Jubeir told reporters in June that the US had the most to lose if JASTA was enacted.

Joseph Gagnon, a senior fellow at the Peterson Institute for International Economics, said estimates put the figure of official Saudi assets in the US at between $500bn and $1 trillion, when considering potential foreign bank deposits and offshore accounts.

Source: News Agencies