WASHINGTON — Families of the victims of the Sept. 11 attacks say they are “greatly distressed” that the Obama administration is working to derail legislation giving them the right to sue the government of Saudi Arabia for any role that elements of the Saudi government may have played in the attack.

“Your place in history should not be marked by a campaign to foreclose the judicial process as a venue in which the truth can be found,” more than a dozen relatives of Sept. 11 victims wrote to President Barack Obama.

The family members also urged Obama to permit the declassification and release of U.S. intelligence bearing on the topic of possible Saudi involvement in the attacks.

At issue is a bill that would allow victims’ families to hold the Saudi government liable in U.S. court.

House Speaker Paul Ryan tiptoed into the swelling controversy Tuesday, telling reporters that lawmakers need to review the bill “to make sure that we’re not making mistakes with our allies.” Obama is traveling to Saudi Arabia on Wednesday as part of an overseas trip.

“The White House is opposed to it. It’s received some opposition here. We’re going to let these things work the process,” said Ryan, R-Wis.

The White House said it is opposed to the bill because it could expose Americans overseas to legal risk and could damage the U.S. relationship with the Saudi government. The Kingdom has threatened to pull billions of dollars from the U.S. economy if the legislation is enacted.

“If we open up the possibility that individuals in the United States can routinely start suing other governments, then we are also opening up the United States to being continually sued by individuals in other countries,” Obama said in an interview with CBS News.

Obama’s visit to Riyadh promises to address a host of issues concerning the U.S. relationship with Saudi Arabia, a key ally in fighting terrorism and bolstering stability in the region. The Saudis have long pushed, with no success, for more aggressive U.S. military action to counter Iran in Syria and Iraq.

Top bill sponsor John Cornyn, R-Texas, dismissed Obama’s objections to his Justice Against Sponsors of Terrorism Act.

“It makes minor adjustments to our laws to help Americans who are attacked on U.S. soil get justice from those who sponsor and facilitate that terrorist attack,” Cornyn said.

But Sen. Lindsey Graham, R-S.C., said he’ll block the bill until he’s sure the legislation won’t boomerang on the United States.

“I’m asking questions about what does this mean because what we do could bite us later,” Graham said.

Graham, a retired Air Force lawyer and the chairman of the Senate subcommittee that controls foreign aid, said his concerns are rooted in the various groups the United States supports in the Middle East against the Islamic State and Assad.

Sen. John McCain, R-Ariz., the chairman of the Armed Services Committee, cited the Saudis’ threat to “unload hundreds of billions of dollars in assets.” He added that the Saudis are key U.S. allies in the fight again the Islamic State group and Syrian President Bashar Assad.

“We need the relationship,” McCain said.

Sen. Richard Burr, R-N.C., the chairman of the Intelligence committee, said he opposed the bill that has some 22 Senate co-sponsors.

Cornyn said Tuesday he has not discussed with Senate Majority Leader Mitch McConnell whether he supports the bill and when McConnell may schedule it for consideration by the full Senate. But Cornyn said that’s unlikely to happen while Obama is in Saudi Arabia.

McConnell told reporters he is still looking at the legislation.

Beyond the bill, five senators are calling on Obama to press the Saudis during his visit on human rights issues and raise the cases of two imprisoned advocates when he visits Riyadh this week.

Marco Rubio, Patrick Leahy, Dick Durbin, James Risch and Ron Johnson sent a letter to Obama on Tuesday asking him to make the issue a prominent part of his trip. They said unless Obama makes human rights a priority, U.S.-Saudi relations will suffer.

AP Diplomatic Writer Matt Lee contributed to this report.