Senate Republicans defeated a war powers resolution Thursday that would have directed President Donald Trump to end U.S. involvement in the conflict with Iran unless Congress granted explicit approval.

The chamber voted 51 to 48 along largely partisan lines to reject the measure, which had passed the House earlier this year. Only three Republicans joined Democrats in support: Sens. Susan Collins of Maine, Lisa Murkowski of Alaska, and Rand Paul of Kentucky. The lone Democrat opposing the resolution was Sen. John Fetterman of Pennsylvania.

The vote represented the first major congressional action on the Iran conflict since Democrats gained control of both chambers in the November 3 midterm elections. Republicans maintained unity behind Trump despite widespread voter dissatisfaction with the war that began February 28.

The resolution carried no binding legal force and would have served primarily as a symbolic rebuke. Democrats have advanced multiple similar measures since the start of hostilities, which involve U.S. and Israeli operations against Iran.

Public approval for the campaign stands at just 31 percent according to a recent Reuters/Ipsos poll. The conflict has resulted in at least 23 U.S. service member deaths and more than 850 injuries, with costs exceeding $47 billion as of mid-October.

Republicans argued the measure undermined the commander in chief during an ongoing operation. Democrats countered that the war lacked sufficient congressional authorization and reflected voter priorities from the midterms.

The outcome underscored continued Republican backing for the president on national security matters heading into the final weeks of the current Congress.