The Senate reversed course late Wednesday night from a day earlier on a resolution aimed at limiting President Donald Trump’s war powers in the Iran conflict, giving the president a legislative victory over congressional dissenters on how his administration is handling the military conflict with Iran.The measure was initially introduced by Sen. Tim Kaine (D-VA) and would have required the president to remove the U.S. military from engaging in combat “within or against Iran” unless a congressional vote granted him full authorization. On Tuesday, four Republican senators broke with the party to advance a resolution passed in the House of Representatives to limit the president’s war powers. Two Republicans, Sen. Rand Paul (R-KY) and Sen. Bill Cassidy (R-LA) switched their votes on Wednesday night, and Kaine’s resolution failed to advance in a 47-50-1 vote. Paul voted present, and Cassidy voted against advancing it on Wednesday.

The vote came after Trump expressed anger with Tuesday’s adoption of the resolution that would have limited his war powers. Calling it a “poorly timed and meaningless” vote, Trump said it “provided aid and comfort” to the enemy, and hampered him in negotiations with the Iranians.