Updated

The Senate failed Thursday to override President Trump's veto of legislation that would have curbed his ability to unilaterally launch military action against Iran without congressional authorization.

The Senate needed a two-thirds majority but came up short with a 49-44 vote, meaning Trump's veto stands. Seven GOP senators joined with Democrats.

Trump vetoed the war powers resolution Wednesday, calling the bipartisan measure "insulting" and argued that it was part of a ploy by Democrats to divide Republicans and oust him from office in November.

TRUMP VETOES IRAN WAR POWERS RESOLUTION, SWIPES AT REPUBLICANS WHO BACKED IT

"The few Republicans who voted for it played right into their hands," he said. "Contrary to the resolution, the United States is not engaged in the use of force against Iran."

This was Trump's seventh veto of his presidency.

There's only been 111 successful veto overrides in history. With 93 senators voting Thursday, they needed 62 yeas to become the 112th, but fell far short.

Among the 49 yea votes were seven Republicans who broke with Trump: Sens. Lamar Alexander of Tennessee, Lisa Murkowski of Alaska, Susan Collins of Maine, Mike Lee of Utah, Rand Paul of Kentucky, Todd Young of Indiana and Bill Cassidy of Louisiana.

Sen. Jerry Moran of Kansas joined with Democrats in passing the war powers resolution in February, but did not vote on Thursday.

HERE ARE THE TIMES PRESIDENT TRUMP HAS ISSUED A VETO

The resolution followed a January airstrike ordered by Trump that killed Iranian Gen. Qassem Soleimani, the head of the Islamic Revolutionary Guard Corps' elite Quds Force, at Baghdad International Airport. The attack was followed by Iran's own air attack on an Iraqi base housing American troops, in which dozens suffered traumatic brain injuries.

In his veto message, Trump said the resolution would have hampered a U.S. president's ability to protect America's allies.

“The resolution implies that the president’s constitutional authority to use military force is limited to defense of the United States and its forces against imminent attack,” he said. “That is incorrect. We live in a hostile world of evolving threats, and the Constitution recognizes that the president must be able to anticipate our adversaries’ next moves and take swift and decisive action in response. That’s what I did!”

Sen. Tim Kaine, D-Va., authored the bipartisan resolution to curb Trump's war powers and urged his colleagues to override the president's veto, saying the legislation is needed to help avoid unnecessary war in the Middle East.

He said he was "shocked" that Trump thought a move by Congress to assert its constitutional powers on matters of war and peace had to do with his November election and politics.

"What I find so notable about that statement is that the president could not see Congress expressing an opinion about war through any lens other than himself and his reelection," Kaine said in a speech before the vote.

CLICK HERE TO GET THE FOX NEWS APP

Sen. James Inhofe, R-Okla., however, praised Trump's "boldest" defense policy decision yet to strike the "monster" of Soleimani and said that Trump has shown in the months since he wasn't on a march to go to war with Iran.

"I think this has been twisted around in a way to make the president look bad," Inhofe said. "In his heart, he knew what he was doing at the time."

The Senate passed the initial war powers measure 55-45 in February with the help of eight GOP senators, and so did the House in March, 227-186 with help from six Republicans.

The veto override attempt does not go to the House since the Senate failed Thursday. A two-thirds majority vote of both chambers is necessary.

Fox News' Chad Pergram, Louis Casiano and Morgan Philips contributed to this report.