Defense Secretary Jim Mattis.
Defense Secretary Jim Mattis.

ON A PLANE ABOVE THE PACIFIC OCEAN - Turkey alerted the United States before striking a U.S.-allied Kurdish militia in northern Syria, according to U.S. Defense Secretary Jim Mattis.

"They warned us before they launched the aircraft that they were going to do it," Mattis told reporters Sunday on a plane headed for Southeast Asia.

Turkey on Saturday began bombing the Kurdish-controlled city of Afrin along the Turkish border in northern Syria, in an attempt to drive the Kurdish People's Protection Units, or YPG, from the area.

Mattis said the communication took the form of a telephone call between high level Turkish and U.S. military officials. But he declined to say whether U.S. officials cautioned Turkey against the strikes.

"We are very alert to it. Our top levels are engaged…and we're working through it," Mattis said. "We'll work this out."

The YPG is a key U.S. partner in the war against Islamic State, and makes up a large portion of the Syrian Democratic Forces  a coalition that has forced Islamic State from virtually its entire so-called caliphate.

FILE - Kurdish fighters from the People's Protecti
FILE - Kurdish fighters from the People's Protection Units (YPG) chat with members of U.S. forces in the town of Darbasiya next to the Turkish border, Syria, April 29, 2017.

But Turkey views the YPG as a terrorist group, and says it is linked with Kurdish separatists within its own borders.

"They have proven their effectiveness," said Mattis. "It has cost them thousands of casualties, but you have watched them, with coalition support, shred ISIS' caliphate in Syria, and that's a matter of arithmetic."

Mattis acknowledged that the success against Islamic State "does not remove many of Turkey's concerns," adding that it is "easy to understand" why Ankara is worried the conflict will spill over the Syrian border.

"Turkey is a NATO ally. It's the only NATO country with an active insurgency inside its borders. And Turkey has legitimate security concerns," Mattis said.

The U.S. and Turkey have worked together to fight Islamic State as part of an international coalition. Specifically, U.S. and other planes have used Turkey's Incirlik military base to carry out strikes on IS.

The U.S. military currently has about 2,000 personnel in Syria. But no US forces are at risk because of the Turkish offensive "at this time," Mattis said.