BERLIN (Reuters) - The German government must ensure any support provided by a U.S. military base in Germany for U.S. drone strikes in Yemen complies with international law, a German court ruled on Tuesday, handing a partial victory to critics of such strikes.

An administrative appeals court in Muenster upheld an earlier ruling that had rejected a request by relatives of Yemenis killed in drone strikes that Germany ban participation by Ramstein Air Base in any drone strikes in Yemen.

But the appeals court said Germany had a responsibility to ensure that use of a Ramstein relay station for satellite data to the drones did not violate international law, and said Germany should monitor the activities closely.

The court said Germany had an obligation to protect the lives of the plaintiffs, who brought their case in Germany after losing relatives to U.S. drone strikes in 2012. A U.S. court had rejected a similar complaint.

U.S. forces have repeatedly carried out drone and air strikes targeting al Qaeda militants holding parts of south Yemen, and some civilians have been killed.

The court said Germany was obliged to do what it could to protect the plaintiffs even if they lived abroad, “as (they) legitimately fear a danger for their lives and safety from U.S. drone strikes violating international law by using infrastructure at the Ramstein air base”.

The German government’s finding “that there were no indications of violations of German or international law by the U.S. caused by their activities in Germany is based on an insufficient assessment of the facts and is not legally sustainable,” the court said in its ruling.

If necessary, Berlin needed to call on fellow NATO ally Washington to ensure international law is being respected, the court said, without detailing which specific measures Berlin would need to take.

The court added that the ruling could still be challenged through an appeal.

The German Foreign Ministry said it would study the court ruling carefully, adding that it was in regular and confidential talks with Washington about Ramstein’s role supporting the U.S. military’s use of unmanned aircraft.

A spokesman for U.S. Air Forces in Europe, said the U.S. military was in close dialogue with German officials about all matters related to U.S. military bases in Germany.

“The U.S. Air Force does not launch or operate remotely piloted aircraft from Germany as part of our counter terrorism activities,” he said, adding that troops based at Ramstein carried out operational planning, monitoring and assessment of military missions throughout Europe and Africa.

The German Defense Ministry, which represented Berlin before the court, said it would wait to study the full ruling before deciding about a possible appeal.

The United States and Germany are allies in NATO and Washington has had a military base at Ramstein since 1948.