WASHINGTON — Congress voted overwhelmingly Wednesday to allow victims of 9/11 to sue the government of Saudi Arabia, an unprecedented change to sovereign immunity that legal experts say could open the U.S. to a flood of litigation and the first veto override for President Barack Obama.

The bill – which passed easily through both chambers of Congress – faced an aggressive last-minute ditch effort by the White House, Saudi lobbyists and a number of top military officials. But despite dire warnings, Congress overrode the Obama’s veto in a sweeping bipartisan decision.

“The Justice Against Terrorism Act will send a strong message to those who sponsor terrorist attacks on American soil,” said Sen. John Cornyn, R-Texas, who co-authored the bill. “Foreign governments will answer to those victims and pay for the death and destruction that they caused.”

Speaking to reporters Wednesday aboard Air Force One, White House press secretary Josh Earnest called the override “the single most embarrassing thing the Senate has done” in decades. He followed up on Twitter, criticizing Congress for ignoring advice from military leaders who said the bill would jeopardize the safety of  service members stationed abroad.

Over the past week, the European Union, Defense Secretary Ashton B. Carter and Genl. Joseph F. Dunford Jr., the chairman of the Joint Chiefs of Staff, all cautioned against overriding Obama’s veto.

Proponents of the bill — who have been in Washington since last week to ensure a successful override vote — celebrated Wednesday afternoon what they called a “great day for democracy.” Terry Strada, national chairwoman for 9/11 Families & Survivors United for Justice Against Terrorism, said the bill paved a way toward justice. Strada’s husband was among the dead at the World Trade Center on 9/11.

“Nine-eleven families have been fighting for justice for over 15 years and this bill will simply allow us to present the evidence that we have against Saudi Arabia in a courtroom,” Strada said.

The bill, formally known as Justice Against Sponsors of Terrorism Act, amends a section of the Foreign Sovereign Immunities Act to allow for litigation against nations that have played a role in terrorist attacks on American soil. But experts say Strada and others seeking legal redress face an uphill battle to win any sort of victory against the Saudi government.

“If they had actual evidence of Saudi complicity in a really tangible way that evidence would have been out in the open,” said Lori Damrosch, a law professor at Columbia University. “Presumably the plaintiffs hope that they would be able to use a lawsuit against Saudi Arabia as a way … of discovery of what classified material might show.”

In July, the government released a long-classified report that said some 9/11 attackers received support from individuals likely connected to the Saudi government. However, the report also conceded that much of the information “remains speculative and yet to be independently verified.”

Families of 9/11 victims say this report, known as the “28 pages,” gives them hope in pursuing a case against Saudi Arabia. But to prove any sort of complicity, the families would need substantial evidence that the Saudi government aided and abetted in the attacks.

This, legal scholars say, is a daunting task.

“The plaintiffs would have to prove that the Saudis in some way conducted, supported or financed (the terrorists),” said Don Wallace, chairman of the International Law Institute and a professor of law at Georgetown University. “That would be hard to prove.”

Wallace added any dilution of sovereign immunity — specifically a law enacted in 1976 that gives states broad immunity from American lawsuits — could have a devastating effect on foreign relations.

“I can understand completely the feelings of people, but in our system the government has to conduct relations with others and it’s very tricky when you allow private parties,” Wallace said. “It tends to unnecessarily ruffles relations with states.”

In his veto message last week, Obama expressed “deep sympathy for the families of the victims of the terrorist attacks of September 11, 2001, who have suffered grievously.” But, he warned, the bill would undermine U.S. efforts to stem foreign terrorism by allowing private litigation.

“This would invite consequential decisions to be made based upon incomplete information and risk having different courts reaching different conclusions … which is neither an effective nor a coordinated way for us to respond to indications that a foreign government might have been behind a terrorist attack,” he wrote.

Speaking to the Senate on Wednesday, Sen. Chuck Schumer, D-N.Y., said the bill, which he co-authored with Cornyn, would merely provide a path to justice for victims of the 9/11 attacks and downplayed the possibility of reciprocation abroad.

“This bill is near and dear to my heart as a New Yorker,” Schumer said, “because it would allow the victims of 9/11 to pursue some small measure of justice, finally giving them a legal avenue to pursue foreign sponsors of the terrorist attack that took from them the lives of their loved ones.”