WASHINGTON—The House of Representatives passed a resolution that would limit the president’s ability to take military action against Iran without approval from Congress.

The measure passed 227-186, sending the bill to the president’s desk. Six Republicans voted with Democrats in favor. While it directs President Trump to end the use of military force against Iran unless authorized by Congress, it doesn’t prevent the U.S. from defending itself against an imminent attack.

The war powers resolution was sponsored by Sens. Tim Kaine (D., Va.), Mike Lee (R., Utah), Rand Paul (R., Ky.) and Dick Durbin (D., Ill.) in the aftermath of the U.S. strike in January that killed Iranian General Qassem Soleimani. It passed the GOP-held Senate 55-45 last month with bipartisan support. It now heads to President Trump to sign, but the White House has said the administration strongly opposes the bill and Mr. Trump will veto it.

The White House didn’t immediately respond to a request for comment on Wednesday. The votes in the House and Senate fell short of the two-thirds majority needed in both chambers to overcome a presidential veto.

In a statement issued Feb. 12, the White House said the resolution fails to account for the present reality.