WASHINGTON — Congress sent President Obama a bipartisan bill that would allow families of Sept. 11 victims to sue the government of Saudi Arabia, putting lawmakers on a collision course with the White House on the eve of the 15th anniversary of the attacks.

The House passed the legislation Friday by voice vote, about four months after the measure cleared the Senate despite vehement objections from Saudi Arabia.

Fifteen of the 19 hijackers were Saudi nationals.

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.

The White House has signaled Obama would veto the legislation over the potential for it to backfire and apprehension about undermining a longstanding yet strained relationship with a critical U.S. ally in the Middle East. The Obama administration has warned that if U.S. citizens can take the Saudis to court, then a foreign country could in turn sue the United States.

Votes from two-thirds of the members in the House and Senate would be needed to override a veto.

Rep. Ted Poe, R-Texas, said the U.S. government should be more concerned about the families of the victims than “diplomatic niceties.” Poe said he doesn’t know if the Saudi government had a role in the Sept. 11 attacks.

“That’s for a jury of Americans to decide,” Poe said.

There was no immediate comment from Saudi Arabia. The timing of the vote could be seen as an additional slap at the kingdom, which was preparing for the annual hajj pilgrimage beginning Saturday. But a sponsor of the bill, Rep. Jerrold Nadler, D-N.Y., said lawmakers were focused only on the symbolism of bringing the bill to the floor as close to the 15th anniversary as possible.

Sens. Chuck Schumer of New York and Richard Blumenthal of Connecticut, both Democrats, called on Obama to sign the bill. “If Saudi Arabia had no involvement with the attacks, it has nothing to fear from litigation,” they wrote in a letter Friday.

The bill’s proponents disputed the argument that there will be a boomerang effect if the measure is signed into law. Rep. Peter King, R-N.Y., another sponsor, said foreign governments cannot look the other way if terrorist activities are being plotted or launched from their countries.

Terry Strada, national head of 9/11 Families United For Justice Against Terrorism, dismissed fears the U.S. could be the target of lawsuits.