CIA Director Brennan participates in session at Intelligence and National Security Summit in Washington Thomson Reuters

CIA Director John Brennan warned on Wednesday that Congress’s override of a presidential veto of contested new legislation will pave the way for foreign nations hostile to the United States to detain American officials at will for alleged crimes, according to a statement.

Brennan expressed strong opposition to Congress’s override of a bill permitting American victims of the 9/11 terror attacks to sue Saudi Arabia for its alleged involvement in the plot.

However, the bill—known as the Justice Against Sponsors of Terrorism Act, or JASTA—will also provide similar legal recourse to foreign nations, meaning that they could detain top US officials, military leaders, and others.

Leading US officials, including Brennan and Defense Secretary Ash Carter, have warned that the consequences of the bill would enable foreign nations to meddle in US counterterrorism operations and force the disclosure of sensitive classified material.

JASTA “will have grave implications for the national security of the United States,” Brennan said. “The most damaging consequence would be for those US government officials who dutifully work overseas on behalf of our country. The principle of sovereign immunity protects US officials every day, and is rooted in reciprocity”.

“If we fail to uphold this standard for other countries, we place our own nation’s officials in danger,” Brennan said. “No country has more to lose from undermining that principle than the United States—and few institutions would be at greater risk than CIA.”

Carter made a similar argument earlier this week, telling top lawmakers that the legislation sets the stage for foreign nations to seize US assets abroad and detain troops for alleged crimes.

A coalition of Iraqis has already vowed to take America to court for war crimes.