JASTA allows attack survivors and relatives of victims to pursue cases against foreign governments in US federal court and to demand compensation if such governments are proved to bear some responsibility for attacks on American soil.

In a statement on Thursday, the Saudi government said the enactment of the law was a matter "of great concern" and called on the US Congress "to avoid the serious unintended consequences that may ensue", without elaborating on what the consequences might be.

"The erosion of sovereign immunity will have a negative impact on all nations, including the United States," the Saudi foreign ministry said in the statement, which was carried on state news agency SPA on Thursday.

The erosion of sovereign immunity is also a concern among the six-nation Gulf Cooperation Council, of which Saudi Arabia is the most powerful member.

Saudi Arabia's Gulf allies have lined up beside Riyadh to criticise the law.

Analysts said a successful lawsuit against the Saudi government would be unlikely at best, but speculated that the uncertainty surrounding the legal implications could negatively affect bilateral trade and investment with an ally.

"It will be very difficult for Saudi Arabia to continue in intelligence cooperation when they take such a hostile position," Jamal Khashoggi, a veteran Saudi journalist and analyst, told AFP news agency.

He said Saudi officials are probably debating whether to act now or "wait until the first suit is filed".