WASHINGTON — 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 bill 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 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 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.

WATCH: Fighting, starvation and disease yield grim crisis in Yemen

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."

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.

Watch more of the PBS NewsHour's ongoing coverage: Inside Yemen.