President Obama today vetoed a bill that would allow survivors of the 9/11 attacks, along with victims' families, to sue the government of Saudi Arabia.

“I am returning herewith without my approval S. 2040, the ‘Justice Against Sponsors of Terrorism Act’ (JASTA), which would, among other things, remove sovereign immunity in U.S. courts from foreign governments that are not designated state sponsors of terrorism,” Obama notes in the veto message.

“I have deep sympathy for the families of the victims of the terrorist attacks of September 11, 2001 (9/11), who have suffered grievously. I also have a deep appreciation of these families' desire to pursue justice and am strongly committed to assisting them in their efforts.”

The veto comes at the end of a 10-day constitutional window after Congress' overwhelming approval of the legislation, setting up a fight that's likely to hand the outgoing president his first veto override.

Suffering his first veto override so late in his second term would be significant, especially considering the president's high approval ratings relative to the rest of his presidency. By comparison, former President George W. Bush was overridden twice during his two terms in office and only in his final two years when his approval rating had plummeted.

The last president to make it through a full presidency without a veto override is Lyndon B. Johnson.

If passed into law, the legislation would allow victims of terrorism to sue foreign governments for damages.

Obama and the White House have argued that language in the bill could potentially compromise the principle of “sovereign immunity,” and put the U.S. government and entities at risk of being sued by other countries.

"Overriding the president's veto means that this country will start pursuing a less forceful approach in dealing with state sponsors of terrorism and potentially opens up U.S. service members and diplomats and even companies to spurious lawsuits in kangaroo courts around the world," White House press secretary Josh Earnest explained to reporters today.

"Our concern extends not just to the impact this would have on our relationship with Saudi Arabia, but rather the impact that this could have on the United States' relationship with countries around the world."

But the showdown has also put the Obama administration at odds politically with the wishes of countless 9/11 families who argue they haven't had their day in court against all parties responsible for the terror attacks. Saudi Arabia has itself spoken critically of and personally lobbied against the effort, maintaining it had no role in assisting the 9/11 terrorists.

The House and Senate each passed the measure by unanimous consent. A veto override requires a two-thirds vote by each chamber, and the White House says it has been working diligently behind the scenes to rally enough Democrats to block the override effort.

Obama's former Secretary of State, Hillary Clinton, has also indicated she would sign the legislation into law if she wins the presidential election.