Washington CNN  — 

The Senate passed an Iran War Powers resolution on Thursday, a rare measure that was approved with bipartisan support despite the fact that it has been opposed by President Donald Trump and aims to rein in his ability to use military action against Iran without congressional approval.

The vote was 55-45. Eight Republicans voted in favor of it: Lamar Alexander of Tennessee, Todd Young of Indiana, Mike Lee of Utah, Lisa Murkowski of Alaska, Susan Collins of Maine, Rand Paul of Kentucky, Bill Cassidy of Louisiana and Jerry Moran of Kansas.

The President warned the Senate not to green-light the measure on Wednesday, tweeting that “it is very important for our country’s security that the United States Senate not vote for the Iran War Powers Resolution,” and adding, “If my hands were tied, Iran would have a field day.”

The White House has also issued a veto threat against it.

Despite that, the resolution, chiefly authored by Democratic Sen. Tim Kaine of Virginia, won bipartisan support. Several Republican senators, including Lee, Paul and Collins, signed on as co-sponsors.

Earlier on Thursday, potential problems threatened to derail the resolution ahead of an the final vote, with Senate Democrats warning that an amendment filed late Wednesday by GOP Sen. Tom Cotton – that Democrats described as a poison pill – could draw enough support to pass and possibly make it difficult for the underlying bipartisan War Powers Resolution to maintain majority support.

Ultimately, however, the Senate defeated the controversial amendment, clearing the way for final passage. The Senate voted to table – or kill – the amendment.

The resolution “directs the President to terminate the use of United States Armed Forces for hostilities against the Islamic Republic of Iran or any part of its government or military, unless explicitly authorized by a declaration of war or specific authorization for use of military force against Iran.”

It includes a provision stating that no part of the resolution “shall be construed to prevent the United States from defending itself from imminent attack.”

Despite some Republican support in the Senate, however, Senate Majority Leader Mitch McConnell has strongly opposed the measure, which is unlikely to win enough votes for a veto-proof majority.

Lee argued during a news conference on Wednesday that the resolution is not at odds with the President’s foreign policy agenda and objectives.

“I support what the President is doing with our foreign policy,” Lee said, adding, “For me, this is about supporting President Trump in his foreign policy, in his effort to make sure that we don’t get involved too easily, too quickly, in an unconstitutional way, in any war. This is entirely consistent with his policy.”

Kaine argued Wednesday that the resolution is “not directed toward President Trump, it would apply equally to any President,” adding, “It’s fundamentally about Congress owning up to and taking responsibility for the most significant decision that we should ever have to make.”

Senate Minority Leader Chuck Schumer, however, argued on Tuesday that passage in the House and Senate will send a warning to the White House, even if the President vetoes the measure.

“It sends a shot across his bow that the majority of the Senate and the majority of the House do not want the President waging war without congressional approval,” he said.

Debate on the Iran war powers resolution comes in the wake of a divisive impeachment trial in the Senate, which temporarily put consideration of the measure on hold as it stalled other legislative business while the proceedings – which ended in acquittal of the President – played out.

Kaine introduced the war powers resolution last month following the President’s decision to order a strike that killed Iranian commander Qasem Soleimani.

The House passed a similar resolution last month, but since the structure and text of the Senate resolution is not identical, the War Powers resolution introduced by Kaine would need to be voted on by the House after it gets a Senate vote before going to the President’s desk.

This story has been updated with additional developments Thursday.

CNN’s Phil Mattingly contributed to this report.