Thousands of Syrian refugees poured into Turkey on Sunday to escape the battle between Kurds and Islamic State (IS) jihadists for the Syrian town of Tal Abyad, as the Turkish authorities reopened the border after days of closure.

The Syrians, many carrying sacks of possessions and small children, flooded through the Akcakale border gate onto Turkish territory, an AFP photographer said.

There had earlier been chaotic scenes as some of the refugees crossed the border illegally through holes in fences, prompting rapid intervention from the Turkish army.

Turkey had for several days been blocking the Syrians from entering Turkey, saying it would only allow them into the country in the event of a humanitarian tragedy.

However, local officials in Akcakale said earlier that permission had been received from Ankara to allow the refugees into Turkey.

The decision came as Kurdish forces advanced on Tal Abyad, which is controlled by the IS group that has captured swathes of Syria and Iraq.

A delay followed which Turkish television said was due to IS jihadists trying to stop the refugees from crossing the border into Turkey.

Chaos ensued with some Syrians managing to push their way through the fences away from the main Akcakale border gate to enter Turkey illegally.

Some squeezed under the mesh-wire barrier while others managed to climb over, throwing their bags over the fence.

They then had to negotiate the border trench with dozens managing to scramble across. The army used water cannon and tear gas in a bid to restore control.

But in the early evening Turkish authorities opened the Akcakale border gate and the refugees began to enter in an orderly fashion.

Many had relatives already waiting for them on the other side. The queue of refugees could be seen extending up the hillside.

With temperatures above 35 degrees Celsius, Turkish emergency workers threw bottled water into the crowds as dozens of hands stretched out to catch them.

The refugees were then registered with the Turkish authorities, receiving vaccinations and health checks.

Those with relations already in Turkey can stay with them, others will be taken to existing refugee camps, the Dogan news agency said.