The U.S. House of Representatives passed a war powers resolution Wednesday seeking to compel President Donald Trump to withdraw U.S. forces from hostilities against Iran, intensifying political pressure on the administration and marking a rare bipartisan effort to limit presidential war-making authority.

The resolution states that any military action would require a formal declaration of war or authorization by Congress. Operations necessary to defend the United States or an ally against imminent attacks would be exempt.

The measure passed by 215 votes to 208, with four lawmakers from Trump's Republican Party joining Democrats to help secure its approval.

The resolution has no immediate consequences for U.S. policy toward Iran, but highlights growing political pressure on Trump, especially with midterm congressional elections due in five months.

A growing number of Republicans are now openly opposing Trump's war strategy.