Gregory Korte

USA TODAY

WASHINGTON — President Obama made good on his threat to veto a bill allowing lawsuits against foreign sponsors of terrorism Friday, setting up what could be the most contentious veto override vote of his presidency.

The Justice Against Sponsors of Terrorism Act, or JASTA, would provide an exception to the doctrine of "sovereign immunity," which holds that one country can't be sued in another country's courts.

In an extraordinary three-page veto message to Congress, Obama said he has "deep sympathy" for the families of victims of terrorism, but that the legislation would interfere with the president's ability to conduct foreign policy.

"I recognize that there is nothing that could ever erase the grief the 9/11 families have endured," Obama said. "Enacting JASTA into law, however, would neither protect Americans from terrorist attacks nor improve the effectiveness of our response to such attacks."

The veto came on the last possible day for Obama to act under the Constitution, which gives the president 10 days (excluding Sundays) to veto a bill before it automatically becomes law. The White House had been stalling for time in hopes of changing minds on Capitol Hill.

"We certainly are counting votes and having a number of conversations with members of Congress in both parties and both houses of Congress," White House Press Secretary Josh Earnest said Friday. "I'm also acknowledging that the politics of the situation are really tough. And if anything, I think that is an illustration of the principled nature of the president's position. The president's not blind to the politics of the situation."

Families of terror victims have lobbied for the bill, which would allow them to sue Saudi Arabian officials who intelligence agencies have suggested had ties to the hijackers of the four planes used in the Sept. 11, 2001, terrorist attacks on New York and Washington. But the bill would also allow lawsuits against other countries as well.

The White House has argued that the bill would prompt other nations to retaliate, stripping the immunity the United States enjoys in other parts of the world. "And no country has more to lose, in the context of those exceptions, than the United States of America, given the preeminent role that we play in global affairs," Earnest said.

The veto was the 12th of Obama's presidency, and the first to face the serious prospect of a veto override. It would take a two-thirds vote of both chambers for the bill to become law over Obama's objections — concerns that Congress was already aware of when it passed the bill by voice vote, suggesting near unanimous support.

House approves bill letting 9/11 families sue Saudis

The bill now goes back to the Senate, where its sponsor, Sen. John Cornyn, R-Texas, has already promised quick action to override.

"It is really inexplicable to me that the president would talk about vetoing this opportunity for the victims of 9/11 and their families to be able to make their case in court," he said last week. "I would love to have him sign the legislation into law, but if he decides to veto it, I hope he does it quickly so we can just as quickly vote to override that veto. There is no reason why we need to make these families wait any longer."

Even if Congress sustains the veto, both major candidates for president say they support the measure and would sign it. Democrat Hillary Clinton said she supports the legislation "to hold accountable those responsible" for the 2001 terrorist attacks; Republican Donald Trump called Obama's veto "one of the low points of his presidency."

Both the House and Senate had hoped to depart Friday for a fall recess in order to campaign, but are stuck in Washington to hammer out a spending bill by Oct. 1 to avert a government shutdown. When Congress is not in session, the president can issue a "pocket" veto, which can't be overriden — but that tool is no longer an option.

Most of Obama's vetoes have come in the past year, and Democrats have been able to rebuff override attempts. But even the threat of a veto has been enough to stave off some GOP legislation. Last week, Obama boasted to Democratic donors that he hasn't had to wield his veto pen as often as some had predicted, given Republican control of Congress. He said GOP leaders "can't even pass their own priorities, so that I don't generally even have to veto anything because they can't get organized enough even to present the cockamamie legislation that they’re interested in passing."

The White House has acknowledged the possibility of an override. "You don't have to have an advanced degree in math to understand the significant support that exists in the United States Congress for this bill," Earnest said last week. "But the concerns that we have about this legislation are significant and there are many members of Congress who are sympathetic to the argument."