Washington CNN  — 

The Senate on Thursday failed to override a presidential veto of a War Powers resolution intended to rein in presidential authority to use military action against Iran without congressional approval.

The vote was 49-44. A two-thirds majority would have been required for a successful override, which was not expected to happen after President Donald Trump vetoed the resolution on Wednesday.

But the fact that the measure made it to the President’s desk with bipartisan support in the first place nevertheless represented a rare rebuke by his own party and stood as a show of support for congressional efforts to check the executive branch’s war-making powers.

When the resolution passed the Senate in February, eight Republicans voted in favor of it even as the President voiced opposition. In March, the resolution passed the House, where a handful of Republicans joined Democrats in supporting the resolution.

The resolution was introduced by Democratic Sen. Tim Kaine of Virginia and was co-sposnored by several Republican senators, including Mike Lee of Utah and Rand Paul of Kentucky.

Senate Majority Leader Mitch McConnell, however, spoke out against the War Powers Resolution saying this is no time to take pressure off the Iranian regime, which, he argued, is using its “scant resources to export violence” around the region and the world.

In issuing a veto on Wednesday, Trump called it a “very insulting resolution” and argued the measure was “based on misunderstandings of facts and law” in a statement.

“This indefinite prohibition is unnecessary and dangerous,” the White House said in a separate message to the Senate on Wednesday.

Kaine said in a speech on Thursday that the bill was “not part of a strategy to hurt President Trump.”

“I’ve advocated these same positions as have other members of this body under presidents who were both Democratic and Republican,” Kaine said, adding that “in no way was this partisan.”

The resolution called for “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 included a provision ensuring the President would still be able to defend the United States from “imminent attack” absent congressional approval.

CNN’s Nikki Carvajal contributed to this report.