Germany must ensure that the United States respects international laws when deploying drones over Yemen, a German court ruled Tuesday, in what amounted to a partial victory for three Yemeni plaintiffs.

The trio had turned to the court after losing close relatives to a drone attack in 2012 in Hadramaut province.

Pointing to the significance of the U.S. airbase in the German town of Ramstein for drone deployments in Yemen, they took their case to Germany, seeking to make Berlin stop Washington from using the base in such unmanned missions.

On Tuesday, the court rejected their call for the German government to outlaw the involvement of Ramstein in drone attacks on Yemen.

At the same time, the court ordered Berlin to take "appropriate measures to ascertain if the use by the U.S. of the Ramstein airbase in armed drone deployments at the residence of the plaintiff in Yemen complies with international laws."

"If necessary, Berlin would have to work with the U.S. towards compliance (with international laws)," the court said in a statement, stressing that Germany has a responsibility to protect lives.

The court said there was "clear factual evidence" showing that the U.S. was using Ramstein base in drone missions in Yemen that "at least partially violated international law."

As such, "the plaintiffs' right to life is unlawfully endangered," it said.

Andreas Schueller of the European Center for Constitutional and Human Rights which backs the plaintiffs, said the ruling was an "important step towards placing limits on the drone program as carried out via Ramstein".

"Germany must now face up to its responsibility for these strikes," he said.

The U.S. is supporting a Saudi-led coalition fighting against Iran-backed Huthi rebels in Yemen.

Besides intelligence support, Washington has been supplying bombs and other weapons to the coalition.