ONCUPINAR, Turkey - Turkey said it was ready "if necessary" to let in tens of thousands of Syrians fleeing a major Russian-backed regime offensive, as aid agencies warned Sunday of a "desperate" situation.

Thousands of people, including many women and children, are stranded at the Turkish border after an exodus triggered by fierce fighting near Syria's second city Aleppo. "If they reached our door and have no other choice, if necessary, we have to and will let our brothers in," Turkish President Recep Tayyip Erdogan told reporters.

Turkey's Oncupinar border crossing, which faces the Bab al-Salama frontier post inside Syria, remained closed Sunday to thousands of refugees gathered there for a third day, an AFP reporter said. They waited desperately for the moment the gate will open, as Turkish aid trucks delivered food inside Syria.

Carrying what few belongings they still have, Syrians queued up in the cold and rain in squalid camps near the Turkish border, waiting for tents being distributed by aid agencies. Others are reportedly sleeping in the open, in fields and on roads.

The medical aid agency Doctors Without Borders (MSF) said camps for displaced people in the north of Aleppo province were overwhelmed.

"From what MSF can see the situation in Azaz district is desperate, with ongoing fighting and tens of thousands of people displaced," said Muskilda Zancada, the head of the group's Syria mission. "We are still conducting assessments but so far have seen problems with lack of space to accommodate people, and insufficient water and sanitation in many areas."

It said three MSF-supported hospitals had been bombed in recent days although the extent of the damage was unknown because their proximity to the frontlines made access too difficult.

More than 260,000 people have died in Syria's nearly five-year-old conflict, which involves a tangled web of mainstream rebels, Islamists, militants, Kurds and pro-regime forces supported by Russia and Iran.

More than half the population has been displaced and hundreds of thousands have tried to reach Europe, sometimes paying with their lives while making the risky Mediterranean Sea crossing.

The European Union on Saturday said it was Ankara's international obligations to keep its frontiers open to refugees, while also pressing the Turkish government to help stem the flow of migrants to Europe.

A Turkish official said the Oncupinar crossing was "open for emergency situations". "Seven injured were taken to Turkey on Friday and one on Saturday for treatment at Turkish hospitals," he said.

The governor of the Turkish border province of Kilis, Suleyman Tapsiz, said Saturday that Turkey - already home to 2-2.5 million Syrians - was taking care of 30-35,000 refugees who had gathered around the nearby Syrian city of Azaz. Another 70,000 may head for the frontier if Russian air strikes and Syrian regime military advances continued in Aleppo, he added.

Moreover, Syrian government troops advanced Sunday toward a rebel town near the Turkish border as they pressed a Russian-backed offensive that has prompted tens of thousands to flee, a monitor said.

The town of Tal Rifaat is around 20 kilometres (12.5 miles) from the Turkish frontier, where Syrians who have fled fighting near Aleppo city have been gathering since the assault was launched Monday. It is one of the last rebel strongholds in the north of Aleppo province and government troops are just seven kilometres away, according to the British-based Syrian Observatory for Human Rights.

Observatory chief Rami Abdel Rahman said regime troops want to push north to the border with Turkey to prevent rebels and weapons from entering Syrian territory. Syrian pro-government newspaper Al-Watan said Sunday that Tal Rifaat would be a major prize for the regime.

"If it falls, the army will be able to progress and seize control of all of the northern part of Aleppo province," the paper said. Regime forces backed by intense Russian air strikes have closed in on Aleppo city in their most significant advance since Moscow intervened in September in support of President Bashar al-Assad's government.

Syria's mainstream rebels are now threatened with collapse after the regime severed their main supply line to Aleppo city. Opposition forces along with roughly 350,000 civilians are in rebel-held areas of the divided city of Aleppo and face the risk of a government siege. Punitive blockades have been employed elsewhere in the nearly five-year civil war, causing dire humanitarian situations including starvation. Since Saturday night government forces have surrounded the rebel bastion of Daraya in Damascus province.