Turkey's prime minister Ahmet Davutoglu has vowed to take all necessary measures to protect the country's borders from violation after a Russian fighter jet entered its airspace over the weekend, prompting Turkey to scramble jets and summon the Russian ambassador in protest.

Russia admitted the plane had entered Turkey "by mistake" and assured Ankara it would not happen again, he said.

But a senior US official said the Obama administration does not believe the incursion was an accident and officials are in urgent talks with allies about what to do.

In Madrid, US defence secretary Ash Carter said the US was conferring with Turkish leaders about the infringement.

The incident comes amid Turkish concerns over Russian airstrikes in Syria that have targeted some foreign-backed insurgents. Turkey and Russia also have conflicting positions on the Syrian regime, with Russia backing president Bashar Assad and Turkey insisting on his removal.

Mr Davutoglu said Nato member Turkey would enforce its rules of engagement if its airspace is violated. Those rules call for the treatment of any element approaching the Turkish border from Syria as an enemy.

"The Turkish armed forces have their orders," he said. "The necessary will be done even if it's a bird that violates Turkey's border. Our rules of engagement are clear."

A foreign ministry statement said a Russian warplane entered Turkey's airspace near the town of Yayladagi, in Hatay province, on Saturday. Two F-16 jets intercepted the Russian aircraft and forced it to fly back into Syrian airspace.

Turkey's military also said the pilot of a MIG-29 jet had harassed two Turkish F-16s for five minutes and 40 seconds on Sunday by locking its radar on to them.

The military said the incident occurred while 10 F-16s were patrolling the Turkish-Syrian border. The military said it did not know which country the MIG-29 belonged to.

Turkey summoned the Russian ambassador and demanded Russia avoid future infringements, the foreign ministry statement said.

It warned Russia would be held "responsible for any undesired incident", that may occur. The same message was also relayed to Russian foreign minister Sergey Lavrov by telephone.

Nato secretary general Jens Stoltenberg expressed solidarity with Turkey and said the situation would be taken up at a meeting later.

"I call on Russia to fully respect Nato airspace and to avoid escalating tensions with the alliance," Mr Stoltenberg said. "I urge Russia to take the necessary steps to align its efforts with those of the international community in the fight against Isil."

Mr Davutoglu said Russia had assured Turkey its airspace would not be violated again.

"The information we got from Russia this morning is that it was an incident that occurred by mistake," he said. "They said they are respectful of Turkey's borders and that it would not happen again."

Last week, Turkey issued a joint statement with its allies involved in the US-backed campaign against Islamic State asking Moscow to cease attacks on the Syrian opposition and to focus on fighting IS.