The Republican-controlled House voted 215-208 on Wednesday to curb President Trump’s authority to wage war against Iran without congressional consent, handing the White House a bipartisan rebuke as the conflict nears its fourth month. The resolution directs the president to withdraw U.S. forces from hostilities unless Congress explicitly authorizes further action or an imminent attack requires self-defense. It was supported by four Republicans who broke with their party, joining all voting Democrats.

The measure’s passage marks a significant shift in Congress’s posture toward an increasingly unpopular war. When Trump launched airstrikes in late February, Republicans largely backed him, asserting the president’s constitutional authority as commander in chief. But as the war has settled into a fragile ceasefire with no resolution in sight and domestic gasoline prices climbing, GOP lawmakers have begun to waver — with midterm elections sharpening the political calculus.

The resolution faces long odds. Even if the Senate passes a companion measure, Trump can veto it, and supporters lack the two-thirds supermajority to override. The president vetoed similar war-powers resolutions regarding Yemen and Iran during his first term, and Congress failed to override those vetoes.

In the Senate, Republicans have blocked Iran war-powers measures seven times since the war began, but the coalition has shown signs of cracking. Late last month, a procedural motion to discharge a similar resolution from committee succeeded after Sen. Bill Cassidy of Louisiana voted in favor, joining Sens. Susan Collins of Maine, Lisa Murkowski of Alaska and Rand Paul of Kentucky. Three GOP senators were absent for that vote.

The House vote came a day after the Trump administration abandoned a controversial fund that would have benefited participants in the Jan. 6, 2021, Capitol riot, following pushback from GOP senators. The president also dropped a plan to renovate what he called the Trump Kennedy Center after a judge ordered his name removed. His pick of Bill Pulte, a close ally, as acting director of national intelligence has threatened reauthorization of a surveillance program facing a deadline this month.

A Fox News poll released in May found that 60% of respondents opposed U.S. military action in Iran, with 40% in support.

The House is also expected to vote on Ukraine aid this week after a discharge petition gathered enough signatures to force a floor vote. That measure would authorize more than $1 billion in defense aid and $8 billion in loans, along with new sanctions against Russia.