The House on Wednesday passed a resolution to end U.S. military support for the Saudi-led coalition operating in Yemen, a repudiation of President Trump’s continued cooperation with and defense of the kingdom and its crown prince, Mohammed bin Salman.

The measure passed 248 to 177, and was supported by 230 Democrats and 18 Republicans. It marks the end of a months-long campaign from the legislation’s sponsors, whom House Republican leaders blocked last year from bringing the measure to the floor — even as a bipartisan majority of the Senate voted to approve it. House Speaker Nancy Pelosi (D-Calif.) had promised a vote when Democrats took over the House this year.

The war-powers legislation now heads back to the Senate, where sponsors said they are “hopeful” that similar numbers of Republicans and Democrats will vote for it when the measure comes up in the next few weeks. But even if they manage to pass the resolution in that body, Trump is already threatening to veto the measure — and Congress does not have the votes to overcome it.

As Yemen’s civil war enters its fourth year, women are fleeing the violence with their children, making a perilous journey to the port city of Aden. (The GroundTruth Project for The Washington Post)

The president’s advisers this week warned that the War Powers Resolution raised constitutional concerns and was “flawed” in its premise, as U.S. forces were not fighting on the ground in Yemen. Their statement also stressed that the United States had already curtailed the aerial refueling of Saudi warplanes, and that other forms of assistance the United States was providing, such as intelligence sharing and logistical support, would not fall under the auspices of the War Powers Resolution.

Its sponsors, however, rejected that notion. “This is exactly the type of hostilities that the framers of the War Powers Resolution contemplated,” Rep. Ro Khanna (D-Calif.) said in an interview.

The United States is one of several countries backing Saudi forces, which entered Yemen’s long-running civil war in 2015 seeking to oust the Houthi rebels, who are sponsored to an extent by Iran, Saudi Arabia’s chief regional competitor.

Khalil Bamatraf describes the day in 2015 that her city of Mukalla, Yemen, was taken by al-Qaeda and the day of “breathing” in 2016 when it was liberated. (Kareem Fahim, Joyce Lee/The Washington Post)

But in the four years since the United States joined the Saudi coalition, there has been little progress toward resolving the civil war, while an already bleak humanitarian situation there has worsened. Hundreds of thousands of Yemenis have been afflicted by cholera and malnutrition, and millions are at risk of starvation as the stalemate persists.

In the meantime, human rights organizations have charged that Saudi blockades and attacks on Yemen’s ports are preventing civilians from getting much-needed aid. The United States has also come under fire for continuing to provide the Saudis with weapons.

In their veto threat, the president’s advisers also said that the War Powers Resolution would “harm bilateral relationships in the region.”

Before the House passed the resolution, lawmakers attached an amendment to it stating that the measure would not restrict the collection and sharing of intelligence as the president deems appropriate. Intelligence-sharing is a major piece of U.S.-Saudi cooperation, particularly since the administration ended the practice of refueling planes last year.

The House also voted to attach an amendment to the legislation condemning anti-Semitism, an apparent response to comments made this week by Rep. Ilhan Omar (D-Minn.), for which she has apologized. Trump has nonetheless called for her to resign, prompting a retort from Omar that Trump had “trafficked in hate” his entire life, and charges from Democrats that Trump, who has refused to condemn white supremacists on multiple occasions, was being hypocritical.

Republican opponents of the Yemen resolution argued that by focusing solely on ending U.S. support for Saudi Arabia’s campaign, the resolution “sends a green light to the Houthis and their Iranian backers to press on,” as Mike McCaul (Tex.), the ranking Republican on the House Foreign Affairs Committee, put it.

Democrats objected to Republicans characterizing the resolution as soft on Iran, stressing that its chief motivation was to address the humanitarian crisis in Yemen.

“We can go after Iran another time, and heaven knows I’ve been the sponsor of many resolutions and bills sanctioning Iran,” said Rep. Eliot L. Engel (D-N.Y.), chairman of the House Foreign Affairs Committee. “There is a civil war going on now in Yemen and innocent children are dying. We have an ability to put an end to that, and that’s what we should do with this humanitarian crisis. It’s critical that we don’t delay.”

Even if Trump ultimately vetoes the resolution, sponsors argued, the resolve of both the Senate and the House will send a message to the parties equipped to end the conflict.

“Each of these milestones, this has had a dramatic consequence on the actual negotiations in Yemen,” Khanna said, referring to the Senate’s passage of a similar resolution last year. “I do think the famine will be averted if the War Powers Resolution passes the House and Senate.”

Congress has never successfully passed a resolution under the authority Congress granted itself in the War Powers Act to end U.S. participation in hostilities, and less than a year ago, leaders of both parties still thought doing so was a bad idea.

But the killing of Saudi journalist Jamal Khashoggi prompted lawmakers to take a critical look at Saudi leaders, in particular Mohammed, whom many lawmakers have said is liable for the murder.

Trump has to date defended the crown prince’s denials of involvement. Last week, he also missed two congressionally mandated deadlines to report to lawmakers on the status of the humanitarian crisis in Yemen, and announce sanctions against which officials he deemed to be responsible for Khashoggi’s death — or explain why he was declining to do so.

The CIA in November assessed that the crown prince had ordered the killing.

According to a recent news report, Mohammed also told a top aide in 2017 that he would use “a bullet” on Khashoggi if he did not return to the kingdom and end his criticism of the government. The conversation, which was picked up by U.S. intelligence agencies, was first reported by the New York Times on Thursday. After it was published, a Saudi official contacted the CIA and relayed that the crown prince was livid about the news report, according to a U.S. official who spoke on the condition of anonymity to describe classified information.

Ellen Nakashima and Anne Gearan contributed to this report.