WASHINGTON — Democrats and Republicans are vowing to decisively override President Barack Obama’s veto of a bill to allow families of Sept. 11 victims to sue the government of Saudi Arabia for the kingdom’s alleged backing of the terrorists who killed nearly 3,000 people.

Obama rejected the bill Friday, warning of a host of unintended and severe consequences if it were enacted. The legislation, according to Obama, could leave American troops and diplomats overseas vulnerable to lawsuits in foreign courts from people seeking redress for actions taken by armed groups that are backed or trained by the United States.

The bill’s proponents disputed Obama’s rationale, arguing the measure is narrowly tailored and applies only to acts of terrorism that occur on U.S. soil.

“This is a disappointing decision that will be swiftly and soundly overturned in Congress,” said Sen. Chuck Schumer, D-N.Y., who sponsored the bill. “If the Saudis did nothing wrong, they should not fear this legislation. If they were culpable in 9/11, they should be held accountable.”

Sen. John Cornyn, R-Texas, another of the bill’s sponsor, criticized Obama for failing to listen to the families of the victims and said he looked forward to the opportunity for Congress to override the veto.

The bill, which has strained already tense relations with a key Middle East ally, passed the House by voice vote earlier this month. The measure cleared the Senate in May, also by voice vote.

Saudi Foreign Minister Adel bin Ahmed Al-Jubeir had warned lawmakers they were on a path to turning “the world for international law into the law of the jungle.”

Saudi Arabia had no immediate comment Friday on the veto, which came two days after the Senate voted convincingly to back a $1.15 billion sale of American weapons to the kingdom.

The legislation gives victims’ families the right to sue in U.S. court for any role that elements of the Saudi government may have played in the 2001 attacks that killed thousands in New York, the Washington, D.C., area and Pennsylvania. Under the terms of the bill, courts would be permitted to waive a claim of foreign sovereign immunity when an act of terrorism occurs inside U.S. borders.

Fifteen of the 19 Sept. 11 hijackers were Saudi nationals, and speculation continues to persist over links at least a few of them had to other Saudis, including government officials. The allegations were never substantiated by U.S. investigations into the attacks.

Hillary Clinton broke with Obama over the legislation, saying Friday through a spokesman she would sign the bill if she were president. A spokesman, Jesse Lehrich, said the Democratic presidential nominee supports efforts to “hold accountable those responsible” for the attacks.

Donald Trump criticized Obama for the veto and also promised to sign the bill if elected president.

A two-thirds majority vote is required in the House and Senate to override a veto. Obama has vetoed nine bills during his two terms in office. None has been overridden.

The Senate’s top Republican, Mitch McConnell of Kentucky, said earlier this week that “our assumption is that the veto will be overridden.” His spokesman, David Popp, said Friday the Senate will consider the veto override “as soon as practicable in this work period.”

With no recorded votes on the bill, it’s unclear exactly how many members will back the override. There could be lawmakers having second thoughts about bucking the president after Defense Secretary Ash Carter gave weight to concerns the bill could backfire on service members.

Carter said during testimony Thursday before the Senate Armed Services Committee that it could be a problem if another country was “to behave reciprocally towards the United States.”

In a letter Friday to his GOP colleagues, Rep. Mac Thornberry of Texas, the Republican chairman of the House Armed Services Committee, amplified the military’s concerns and urged Republicans to study the bill’s consequences. He said he opposes the legislation.

“The risks of discovery or trial in foreign courts, including the questioning of government employees under oath, will disclose sensitive information and subject Americans to legal jeopardy of various kinds,” Thornberry said.

But Sen. Richard Blumenthal, D-Conn., said he is confident Congress will overwhelmingly override Obama’s veto.

“This veto denies Americans the opportunity to hold those evil extremists accountable through the very system of justice that they tried — and failed — to strike down,” Blumenthal said.

Follow Richard Lardner on Twitter: http://twitter.com/rplardner