ISLAMABAD (AP) — The head of the United Nations said Tuesday during a visit to Pakistan that drone strikes must comply with international law, touching on an issue that has created friction between Islamabad and Washington.

Ban Ki-moon did not specifically mention whether or not he thought U.S. strikes in Pakistan were in compliance. But a U.N. official investigating the impact of drones, Ben Emmerson, said in March that the attacks contravene international law because they violate Pakistan’s sovereignty.

“As I have often and consistently said, the use of armed drones, like any other weapon, should be subject to long-standing rules of international law, including international humanitarian law,” Ban said at a university in Pakistan’s capital, Islamabad. “Every effort should be made to avoid mistakes and civilian casualties.”

President Barack Obama said during a speech in May in which he defended the drone program that the strikes comply with both U.S. and international law.

Pakistani officials regularly condemn the strikes publicly as a violation of the country’s sovereignty and international law. But the government is known to have supported some of the attacks in secret in the past and even allowed drones to take off from inside the country.

That cooperation has waned as the relationship between the two countries has deteriorated. But U.S. officials, speaking on condition of anonymity to discuss the covert CIA program, insist the country’s powerful army still supports the attacks, despite its public statements to the contrary.

The strikes are very unpopular in Pakistan, where many citizens believe they kill large numbers of civilians — an allegation denied by the U.S.

Ban said any drones used by U.N. peacekeepers will be unarmed. The U.N. announced on Aug. 1 that it had selected its first unarmed surveillance drone, an Italian-made plane that will be tried out by peacekeepers in eastern Congo, which has been engulfed in conflict for nearly two decades.

“Let me be clear that these new tools, such as unmanned unarmed aerial vehicles, are for information purposes only,” said Ban. “They are essentially flying cameras.”