The Senate on Thursday fell short of the votes needed to override President Trump’s veto of legislation demanding an end of U.S. support for the Saudi-led military coalition operating in Yemen, a country plagued by more than four years of a devastating civil war.

The measure, sponsored by Sens. Bernie Sanders (I-Vt.) and Mike Lee (R-Utah), passed the Senate and the House earlier this year, with the support of all Democrats, seven Republican senators and 18 House Republicans. Those same Senate Republicans — Lee was joined by Sens. Susan Collins (Maine), Steve Daines (Mont.), Jerry Moran (Kan.), Lisa Murkowski (Alaska), Rand Paul (Ky.) and Todd C. Young (Ind.) — voted with the Democrats on Thursday to override Trump’s veto in a 53-to-45 vote. Two-thirds of the Senate, or 67 senators, would have been necessary to sustain an override.

The legislation sought to use Congress’s war powers to curtail U.S. logistical and intelligence support for the Saudi-led coalition backing Yemen’s exiled government and its fight against Houthi rebels backed by Iran.

The measure gained support among lawmakers after the killing of Saudi journalist Jamal Khashoggi last fall, which American intelligence officials believe was ordered by the Saudi crown prince, Mohammed bin Salman. But Trump — who has been criticized for his continued embrace of Saudi leaders in the wake of Khashoggi’s death — used the second veto of his presidency to block it.

In Saudi rebuke, Democrats see a path to unseat Trump in 2020

It brought along some Republicans troubled by the worsening humanitarian situation in Yemen, where more than 20 million people are at risk of starvation, and others frustrated by the lack of clear congressional authorization for participation in the conflict. But most Republican lawmakers objected to using Congress’s war powers to end what amounts to a support operation.

Under pressure, the Trump administration late last year scaled back U.S. involvement, halting an aerial refueling mission for coalition warplanes. And earlier this year, the administration issued sanctions against several Saudi officials in response to Khashoggi’s killing.

But lawmakers remain upset that the administration has ignored deadlines to hear from the president about whether other officials, including the Saudi crown prince, should be held responsible for the journalist’s death, and whether the Saudis are taking sufficient action to end Yemen’s civil war.

Yet bipartisan efforts to take other steps — such as a bill to end all nondefensive weapons transfers to Saudi Arabia and to impose sanctions on the perpetrators of Khashoggi’s slaying and those who provide support to the Houthi rebels — have failed to secure the backing of Senate Republican leaders.

The way forward will depend mostly on Senate Foreign Relations Committee Chairman James E. Risch (R-Idaho), who has indicated a willingness to do something addressing the Yemen war but has not specified what that might be.

“We are attempting to craft legislation that can garner support in the committee, address concerns on both sides of the aisle, and actually become law,” Risch said on the Senate floor just before the override vote Thursday.

Pressure also is coming from the Trump administration, which is wary of rocking U.S.-Saudi relations with a definitive congressional step on Yemen.

As lawmakers were preparing to vote, senior defense officials reiterated the Pentagon’s opposition to moves constraining U.S. assistance to Saudi Arabia’s Yemen operation. Military officials have long said that their support provides the United States leverage it can use to nudge Riyadh and its allies toward a more professional conduct of the war.

They also highlight the limited nature of American assistance, which until last fall included aerial refueling of Saudi and Emirati jets but now consists primarily of intelligence sharing.

Katie Wheelbarger, acting assistant defense secretary for international security affairs, told reporters at the Pentagon that U.S. support does not constitute U.S. involvement in hostilities. “There is no military involvement in the Yemeni civil war,” she said.

Such arguments have fanned frustrations among the measure’s supporters, who call it an excuse to shield U.S. operations from legitimate public scrutiny.

“If you’re so confident that we should be involved in this war, let’s debate it, let’s vote on it, let’s let the American people have some say,” Sanders said before the vote Thursday.

Lawmakers who support the resolution also argued that U.S. arms sales and advising the Saudi-led coalition have worsened the already dire humanitarian crisis in Yemen.

“Every time we have a vote on this resolution, and every day the numbers get worse, but let me be clear: These numbers are people,” Sen. Robert Menendez (N.J.), the ranking Democrat on the Foreign Relations Committee, said on the Senate floor Thursday. “Even the coalition countries themselves insist there is no military solution to this man-made conflict.”

Michael Mulroy, deputy assistant defense secretary for the Middle East, said he hoped a United Nations effort to foster peace talks would bring about a swift end to the war. “If the international community were to come together and chart a comprehensive way ahead for Yemen, we could start to see a change in the status quo,” he said.

Mulroy, who recently visited Aden to meet with officials from the internationally recognized Yemeni government, said congressionally imposed constraints would impede the Pentagon’s ability to provide Saudi Arabia with training related to the Law of Armed Conflict and other topics relevant to air operations. Despite such training, coalition warplanes have continued to strike civilian targets, including a hospital supported by aid group Save the Children.

That incident, in late March, killed five children and three adults.