A car is lifted by a crane at the site of a Saudi-led air strike in Yemen's capital Sanaa.

The U.K. high court ruled Monday that the government can continue arms sales to Saudi Arabia, a deal that was challenged by humanitarian groups that say the weapons were being used illegally in the Yemeni civil war.

The decision is likely to be a relief to the British government as Saudi Arabia is one the biggest importers of arms from the U.K., spending about $4 billion over the past two years on British-made weapons. Prime Minister Theresa May welcomed the ruling, which she said “shows that we do in this country operate one of the most robust export control regimes in the world.”

At issue in the case was Saudi Arabia’s two-year-long military involvement in Yemen’s civil war. The conflict has become a proxy war between the kingdom, which supports the Yemeni government, and Iran, its main regional rival, which supports Houthi rebels. The fighting has killed about 10,000 civilians, and the Saudi military has been accused of targeting civilian neighborhoods and infrastructure, including hospitals. But the U.K.’s arms sales to the Saudi government came under scrutiny after Saudi airstrikes targeted a funeral in Yemen last fall, killing 140 people. UN monitors who investigated the claims reported to the Security Council that the Saudi strikes in Yemen “may amount to war crimes.”

A coalition of human-rights groups, the Campaign Against the Arms Trade (CAAT), brought a lawsuit against the arms sales, and argued that the U.K. government acted illegally by supplying Saudi Arabia with arms and aircraft. The group cited British and European Union rules that forbid arms sales if there is a “clear risk” they could be used to break international humanitarian law. But the judge presiding over the case found the U.K. government was working closely with Saudi Arabia to investigate the allegations and was “rationally entitled” to believe the Saudi government was not purposefully targeting civilians.

“Saudi Arabia has been, and remains,” the court wrote, “genuinely committed to compliance with International humanitarian law; and there was no ‘real risk’ that there might be 'serious violations' of International humanitarian law … .”

The Saudi government has a unit devoted to tracking civilians killed in Yemen, but CAAT argued investigators worked too slowly, and have only reported 5 percent of allegations.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.