President Donald Trump on Thursday ripped four “bad” Republicans who joined Democrats in passing legislation that effectively forces the president to end American military operations in Iran.The House passed legislation to “remove U.S. Armed Forces from hostilities against Iran unless explicitly authorized” by Congress, delivering a high-profile foreign policy defeat to the president. The Senate passed similar legislation a few weeks ago.

“Yesterday, in a meaningless vote, the House voted, 4 bad Republicans and all of the Dumocrats, to limit my War Powers, right in the middle of my final negotiations to end the War with the Islamic Republic of Iran,” Trump said in a Truth Social post. “Who would do such an unpatriotic thing. They know where the negotiations stand.”

Iran backed out of negotiations with the United States on Monday, just short of a week after U.S. and Iranian negotiators agreed to extend the ceasefire for two months. On Tuesday, U.S. and Iranian forces traded “self-defense” strikes, in which the U.S. struck Qeshm Island, to which Iran responded with attacks targeting U.S. assets in Kuwait.

Still, Trump condemned the vote, backing U.S. military action as a step toward victory.