WASHINGTON (AP) — The House on Thursday voted to end American involvement in the Yemen war, rebuffing the Trump administration’s support for the military campaign led by Saudi Arabia.

The bill now heads to President Donald Trump, who is expected to veto it. The White House says the measure raises “serious constitutional concerns,” and Congress lacks the votes to override him.

By a 247-175 vote, Congress for the first time invoked the decades-old War Powers Resolution to try and stop a foreign conflict. The Senate vote was 54-46 on March 13.

“The president will have to face the reality that Congress is no longer going to ignore its constitutional obligations when it comes to foreign policy,” said Democratic Rep. Eliot Engel of New York, chairman of the House Foreign Affairs Committee. He said the humanitarian crisis in Yemen triggered by the war “demands moral leadership.”

The war in Yemen is in its fifth year. Thousands of people have been killed and millions are on the brink of starvation. The United Nations has called the situation in Yemen the world’s worst humanitarian crisis.

The top Republican on the committee, Rep. Michael McCaul of Texas, acknowledged the dire situation in Yemen for civilians, but spoke out in opposition to the bill, saying it was an abuse of the War Powers Resolution.

“This radical interpretation has implications far beyond Saudi Arabia,” McCaul said. He warned that the measure could “disrupt U.S. security cooperation agreements with more than 100 counties.”

Democrats overcame a GOP attempt to divide the majority party through a procedural motion involving Israel just minutes before the Yemen vote. Republicans wanted to amend the Yemen bill with language condemning the international boycott movement and efforts to delegitimize Israel. Democrats argued the amendment would kill the Yemen resolution, and most of them voted against the Israel measure.

“This is about politics, this is about trying to drive a wedge into this caucus where it does not belong,” said Rep. Ted Deutch, D-Fla., said to applause from Democrats. Deutch described the boycott movement as “economic warfare,” but called on lawmakers to vote against the amendment.

“The Jewish community also has a history of standing up against atrocities like the humanitarian crisis in Yemen. My colleagues are trying to block us from standing in support of human rights,” he said.

Opposition to the Saudi-led war in Yemen gathered support last year in the aftermath of the killing of U.S.-based journalist Jamal Khashoggi. The Washington Post columnist was killed in October by agents of the kingdom, a close U.S. partner, while he was in the Saudi Consulate in Istanbul. U.S. intelligence agencies and lawmakers believe that Saudi Crown Prince Mohammed bin Salman ordered the murder of Khashoggi, who had written articles critical of the kingdom.

Lawmakers from both parties have scrutinized U.S.-Saudi ties and criticized Trump for not condemning Saudi Arabia strongly enough.