“In the end, we concluded that they were just not willing to listen,” said Tom Malinowski, a former assistant secretary of state and an incoming member of Congress from New Jersey. “They were given specific coordinates of targets that should not be struck and they continued to strike them. That struck me as a willful disregard of advice they were getting.”

Yet American military support for the airstrikes continued.

While American officials often protested civilian deaths in public, two presidents ultimately stood by the Saudis. President Obama gave the war his qualified approval to assuage Saudi anger over his Iran nuclear deal. President Trump embraced Prince Mohammed and bragged of multibillion-dollar arms deals with the Saudis.

As bombs fell on Yemen, the United States continued to train the Royal Saudi Air Force. In 2017, the United States military announced a $750 million program focused on how to carry out airstrikes, including avoiding civilian casualties. The same year, Congress authorized the sale of more than $510 million in precision-guided munitions to Saudi Arabia, which had been suspended by the Obama administration in protest of civilian casualties.

Nearly 100 American military personnel are advising or assisting the coalition war effort, although fewer than 35 are based in Saudi Arabia.

American support for the war met stiff headwinds this fall, when congressional fury over the murder of the Saudi dissident Jamal Khashoggi combined with worries over civilian deaths in Yemen.

In response, the Trump administration ended American air-to-air refueling of coalition warplanes over Yemen in November but has otherwise continued to support the war. This month, the Senate voted to end American military assistance to the war altogether, a sharp rebuke to the Trump administration, but the bill died when the House refused to consider it.

The civilian toll is still rising. According to the Armed Conflict Location and Event Data Project, November was the most violent month in Yemen since the group began tracking casualties in January 2016. There were 3,058 war-related fatalities in November, it said, including 80 civilians killed in airstrikes.