Turkey's Prime Minister Recep Tayyip Erdogan says its armed forces have shot down a Syrian military jet which had violated its airspace.

He warned such action by Syria merited a "heavy response".

But Syria accused Turkey of "blatant aggression", saying the plane had been over Syrian territory at the time.

The incident reportedly occurred in an area where Syrian rebels and government forces have been fighting for control of a border crossing.

Turkey and Syria – once allies – have more than 500 miles (800km) of common border.

The BBC's James Reynolds in Istanbul says Turkey and Syria have been on opposing sides in Syria's war since October 2011 and the two sides have been involved in occasional skirmishes and confrontations

However neither side is interested in a direct, sustained, open war or conflict between the two countries, our correspondent says.

'Caught fire and crashed'

Speaking at a rally of supporters, Mr Erdogan congratulated his air force on its actions on Sunday.

"A Syrian plane violated our airspace. Our F-16s took off and hit this plane. Why? because if you violate my airspace, our slap after this will be hard," he said.

A Syrian military source, quoted by state television, said Turkish air defences had shot down a Syrian jet as it attacked rebels on Syrian territory – an act of "blatant aggression".

The Syrian Observatory for Human Rights – a UK-based activist group – said initial reports from the area suggested the plane came down on the Syrian side of the border.

"Turkish air defences targeted a Syrian fighter bomber as it struck areas of the northern province of Latakia. The plane caught fire and crashed in Syrian territory," the Observatory said.

According to one report, the plane's pilot was able to eject.

Rules of engagement changed

In September last year, Turkey said it had shot down a Syrian helicopter close to its border. Deputy Prime Minister Bulent Arinc said the aircraft was engaged by fighter jets after violating Turkish air space.

A Turkish fighter jet was shot down by Syria over the Mediterranean in June 2012, after Syrian forces said it had entered the country's airspace.

After this incident, the Turkish government announced that it had revised its military rules of engagement towards Syria and would consider every military element approaching its border from Syria as a threat.

Hundreds of thousands have fled Syria for Turkey to escape the three-year uprising against President Assad.

More than 100,000 people have been killed since the Syrian conflict began.

According to UN figures, 6.5 million Syrians have been displaced by the civil war, and 2.5 million are registered as refugees. Lebanon has taken the highest number of refugees, followed by Jordan and Turkey.