Saudi and gulf analysts said that the depth of the Saudi-American alliance gave the kingdom many ways to express its displeasure.

“It is certain that the strategic alliance between the two countries is in a real crisis,” Salman Aldossary, the editor in chief of the Saudi-owned Al-Sharq Al-Awsat newspaper, said in an email. “If it is true that Riyadh shall be harmed by the crisis, Washington also has interests in the region, and they will definitely be affected as well.”

Saudi Arabia has lots of money invested in the United States, and Mr. Jubeir, the Saudi foreign minister, warned that such investments could be withdrawn if Saudi Arabia feared that its assets were in jeopardy of seizure as part of American legal proceedings. It remains unclear if Saudi Arabia will start withdrawing those assets.

The United States has a large military presence throughout the gulf, with training missions in Saudi Arabia and large bases in Qatar, Bahrain and the United Arab Emirates. The United States also cooperates with Saudi Arabia in military operations in Yemen and elsewhere, as well as sharing intelligence for the fight against Al Qaeda and the jihadists of the Islamic State.

“This situation, if exploited, would do a great deal of harm to U.S. interests, let alone Riyadh’s effective cooperation in combating terrorism and the reflection of this on the war on terrorism as led by the U.S.”, Mr. Aldossary said.

Abdulkhaleq Abdulla, a professor of political science in the United Arab Emirates, said that while the law appeared to be aimed only at Saudi Arabia, other countries in the region feared that it was only a matter of time before the United States decided, “Let’s go after them, too.”

While 15 of the 19 hijackers who carried out the Sept. 11 attacks were from Saudi Arabia, two were from the United Arab Emirates, one from Lebanon and one from Egypt.