A British court ruled on Monday that Britain’s extensive sales of arms to Saudi Arabia are legal, rejecting claims by rights groups that the Saudis have violated international law by using those weapons to kill civilians in Yemen’s civil war.

The decision by London’s High Court was praised by Prime Minister Theresa May, who told Parliament that the ruling vindicated the government’s position that it strictly enforces the export of arms, the British news media reported.

But groups including Human Rights Watch, Amnesty International and Oxfam denounced the ruling, saying the court had ignored evidence that the Saudis have devastated Yemen’s civilian population with indiscriminate attacks.

“This sets back arms control 25 years and gives ministers free rein to sell arms to countries even where there is clear evidence they are breaching international humanitarian law,” said Mark Goldring, the chief executive of Oxfam’s British branch. Human Rights Watch said the ruling was a “serious setback for efforts to hold the British government accountable for its arms sales to Saudi Arabia.”