ISTANBUL (Reuters) - Turkey would not hesitate to shoot down planes violating its air space, Prime Minister Ahmet Davutoglu said on Saturday, a day after the NATO member shot down an unidentified drone near its border with Syria.

Syrian, Russian and U.S. coalition aircraft are flying combat missions near Turkey's borders as part of the Syrian civil war. The drone incident highlights the danger that Turkey, with the second largest army in NATO, could be drawn into a military confrontation.

Turkey had already complained of Russian warplanes violating its air space along the border with Syria earlier this month.

"We downed a drone yesterday. If it was a plane we'd do the same. Our rules of engagement are known. Whoever violates our borders, we will give them the necessary answer," Davutoglu told a rally of his ruling AK Party in the central city of Kayseri.

Turkey is still investigating where the drone came from.

A U.S. official said on Friday Washington believed it was of Russian origin, but the Russian defense ministry said all of its planes in Syria had safely returned to base and that all its drones were operating "as planned".

The Turkish military said it shot down the unmanned aircraft after it continued on its course despite three warnings, in line with its rules of engagement. Broadcaster NTV said it had come 3 km (2 miles) into Turkish air space.

The Russian Defense Ministry said on Friday it had established direct contact with the Turkish military to avoid incidents with flights near the border, Interfax news agency reported.