WASHINGTON — A sweeping bipartisan majority in the Senate on Wednesday rejected President Obama’s veto of legislation that would allow families of those killed in the Sept. 11, 2001, terrorist attacks to sue Saudi Arabia for any role in the plot, all but assuring that Mr. Obama would suffer the first override vote of his presidency.
The vote was 97 to 1, with only Senator Harry Reid, Democrat of Nevada, siding with the president.
With the House nearly certain to follow the Senate later on Wednesday, the 9/11 bill will become law in a remarkable yet complicated bipartisan rebuke. Still, the measure itself remains contentious, and even some of those who cast a vote against Mr. Obama conceded that they did not fully support it.
Mr. Obama’s greatest allies on Capitol Hill, who have labored for nearly eight years to stop most bills he opposes from even crossing his desk, turned against him, joining Republicans in the remonstrance.
“This is a decision I do not take lightly,” said Senator Chuck Schumer, Democrat of New York and one of the authors of this legislation. “This bill is near and dear to my heart as a New Yorker, 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.”
The bill’s triumphant journey came without significant congressional debate or intense pressure from voters, but rather through the sheer will of the victims’ families, who seized on the 15th anniversary of the attack and an election year to lean on members of Congress. That effort was aided by the fact that members’ collective patience with the kingdom has waned in recent years.
The Senate vote also represents another White House miscalculation on Capitol Hill, where it was once again slow to pressure members and to see the cracks in its firewall against the bill.
But at the same time, the override underscored the inherent smallness of Republican victories against Mr. Obama since seizing the majority in Congress in 2015. The veto override, while thrilling to many Republicans, came on a bill that was far from the Republicans’ self-identified priorities of unraveling thehealth care law and pushing back on government regulations. Nor was it a measure they had hoped to secure with the president’s help, like overhauling the tax code or passing a major trade agreement.
Instead, the override means the passage of a bill that many Republicans now regret helping. It could prove a boon to one of the party’s traditional enemies, like trial lawyers, and, opponents like President Obama warned, could subject the United States to a flood of lawsuits.
“On an issue of this significance,” said Senator Bob Corker, Republican of Tennessee, “and with so many equities to balance, a fulsome floor debate would have been useful in order to air some of the unintended consequences that could occur following enactment of the legislation.”
The measure would amend a 1976 law that granted other countries broad immunity from American lawsuits, allowing nations to be sued in federal court if they are found to have played any role in terrorist attacks that killed Americans on United States soil.
No one came to the floor to argue in favor of sustaining Mr. Obama’s veto. In recent days, Mr. Obama, Defense Secretary Ashton B. Carter and General Joseph F. Dunford Jr., the chairman of the Joint Chiefs of Staff, all wrote letters to Congress warning of the dangers of overriding the veto.
The law “could be devastating to the Department of Defense and its service members,” Mr. Obama wrote, “and there is no doubt that the consequences could be equally significant for our foreign affairs and intelligence communities.”
For several weeks this summer, a handful of Republican senators including Mr. Corker, chairman of the Senate Foreign Relations Committee, blocked the bill as they worked to soften its impact.
They managed to add a provision that would allow the executive branch to halt the litigation if the executive branch proved in court that good-faith negotiations for a settlement with a nation were underway. This would preserve the executive branch’s purview over foreign policy while still giving a pathway for family members to sue.
The Senate then voted unanimously to pass the bill and send it to the House, with many lawmakers and many White House officials believing that the House would never take up the legislation. Speaker Paul D. Ryan of Wisconsin has made skeptical remarks about the measure, and Representative Robert W. Goodlatte, Republican of Virginia and chairman of the House Judiciary committee, did little with it.
Then earlier this month, Mr. Ryan, who had encountered families of the Sept. 11 victims at a fund-raiser on Long Island, reversed suddenly his usual position of bringing no major bill to the House floor that had not passed muster with the relevant committee, and put the bill on a fast track. The House voted hastily and overwhelmingly in favor, sending it to Mr. Obama’s desk.
This led to some of the bill’s co-sponsors to express fear that it would actually become law.
The bill’s path reflects a growing desire to re-examine Washington’s alliance with Saudi Arabia, which for decades has been a cornerstone of American foreign policy in the Middle East, and deep ambivalence, especially among Republicans, of how to move forward.
Shortly before the vote to override, for instance, Senator Mitch McConnell, Republican of Kentucky and the majority leader, fast-tracked a vote on a measure that sought to block the sale of some tanks to the kingdom, which failed, signaling to Saudi Arabia that Congress had not turned its back on the nation.
Saudi Arabia has warned the Obama administration and members of Congress that the law could force them to sell off hundreds of billions of dollars’ worth of American assets to avoid them from being seized in court settlements. Next came the argument, made by the kingdom’s phalanx of lobbyists, that the law would expose the United States to lawsuits abroad and possibly cause complications for its armed forces.
That view was rejected on the Senate floor Wednesday. “This is pretty much close to a miraculous occurrence,” said Senator John Cornyn, Republican of Texas and one of the biggest champions of the measure, noting how divided Congress is generally along partisan lines. “All of us have come together and agreed that this is appropriate and the right thing to do,” he said.
The Senate vote was less a swipe at Saudi Arabia, he added, and more about giving victims a voice. “When our interests diverge and it’s a question of protecting American rights and American values, I think we should do that,” he said. “This is not about severing our relationship with any ally. This is simply a matter of justice.”