WASHINGTON (AP) — The U.S. on Thursday shot down an armed Turkish drone that had come too close to U.S. troops on the ground in northeastern Syria, U.S. officials told The Associated Press, in a rare use of force by one NATO member against another.

The drone had been dropping bombs on targets near Hasakah, and while it was not aiming at U.S. troops the bombs were determined to be close enough to pose a danger to U.S. forces, one of the officials said.

The officials said the shootdown was ordered after more than a dozen calls to Turkish military officials stating that U.S. forces were on the ground in the area and that the U.S. military would take action to protect them if the drone didn’t leave. The drone was shot down by a U.S. F-16 fighter jet, one official confirmed to the AP.

Typically, the U.S. and Turkish militaries, which are NATO allies, work in close coordination in conducting air maneuvers. But American troops also work closely with Kurdish-led forces to counter the Islamic State group in the region.

The drone had been flying in an “unsafe” and “unsychronized” manner, one official said. After the U.S. repeatedly warned its Turkish counterparts that it had dropped bombs deemed too close to U.S. troops, the drone did appear to stand down, but it then returned, another official said.

The officials spoke on condition of anonymity to discuss the incident before a public announcement.

The U.S. has about 900 troops in Syria conducting missions to counter Islamic State group militants.

There was no immediate comment from Turkey on the shooting of the drone.

The country’s state-run Anadolu Agency reported, however, that the Turkish intelligence service, MIT, carried out an operation against the Kurdistan Workers’ Party, or PKK, and its affiliated Kurdish militia group in Syria, which is known as People’s Defense Units, or YPG. The report said the Turks struck suspected arms and ammunition depots and buildings believed to have been used by the groups’ “sabotage” teams. It did not provide further details on the operation.

On Wednesday, Turkey had carried out airstrikes in Iraq and Syria against Kurdish militant targets following a suicide attack outside Turkey’s interior ministry building earlier this week.

In a press conference following the attack, Turkish Foreign Minister Hakan Fidan said Turkish intelligence officials have established that the two assailants arrived from Syria, where they had been trained. He said Turkey would now target facilities in Syria and Iraq belonging to the PKK or YPG.

The incident risks adding to longstanding tensions between Turkey and the United States, even though Turkey is a strategically important ally and NATO member. U.S. officials and lawmakers have criticized Turkey’s human rights record and its delays in agreeing to Sweden’s membership in NATO. Turkey has been frustrated by U.S. delays in approving 40 new F-16 fighter jets as well as kits to upgrade its existing fleet.

In 2016, Turkish President Tayyip Erdogan accused the U.S. of supporting a failed coup attempt against his government. The U.S. has flatly rejected the claims but has also refused to extradite the leader of the group Erdogan claims was behind the attempt, cleric Fetullah Gulen, who lives in exile in Pennsylvania.

The U.S. has designated the PKK as a “foreign terrorist organization” but has declined to make a similar determination regarding the YPG, which have been a key partner of the U.S. in the fight against the Islamic State group in northern Syria. The U.S. does not believe the YPG represents a threat to Turkey.

As recently as Wednesday, the State Department said there was no change in how the U.S. regards the YPG.

Associated Press writer Suzan Fraser in Ankara, Turkey, contributed.