A spectre is haunting the relief organisations which aid Syrian refugees in southern Turkey. Up to a million frightened people may soon pour across the country’s northern border if, as seems likely, the city of Aleppo falls back into Syrian government hands.

An exodus of such magnitude over just a few days would dwarf any horror yet seen in Syria’s civil war, leaving aid agencies totally unable to cope with the needs. Three years of war have already forced over two million Syrians abroad and left another five million homeless within the country. The United Nations as well as the Turkish, Lebanese and Jordanian governments are struggling to handle the humanitarian crisis.

The latest nightmare arises as Syrian government forces come close to putting a noose around Aleppo, the country’s commercial capital. Since opposition groups first attacked the city in the spring of 2012, President Bashar al-Assad’s troops have managed to keep control of Aleppo’s southern and western districts as well as the civilian airport on the eastern outskirts. Fierce fighting has devastated large parts of the centre, which is divided between government-held and rebel-held districts. Pedestrians have occasionally been allowed to cross the front-line through a single check-point. Food supplies and medical services are inadequate.

After more than a year of stalemate the balance of power has started to shift dramatically. Since January, government troops, making indiscriminate use of so-called barrel bombs and artillery fire, have pushed north of the airport into the rebel-held industrial quarter on the north-eastern edge of Aleppo.

Fighting between Western-supported opposition groups and jihadis from the Islamic State of Iraq and the Levant have also caused heavy losses among the anti-Assad forces and diverted them from their main target, the Syrian government’s troops.

If government forces succeed in moving through the industrial quarter and capturing the rebel checkpoint on the main road that leads from Turkey into Aleppo, they will create a ring of iron around the central districts.

“There are six or seven neighbourhoods of very densely packed streets there. They’re too narrow for tanks to go down, which is why the regime uses barrel bombs to destroy them. It doesn’t risk sending ground troops," one local analyst told Middle East Eye in Gaziantep, the largest town in southern Turkey close to the border crossing for Aleppo. “If it looks as though they’ll succeed in cutting the road, people will escape before it happens," he added.

No-one is sure how many civilians still live in the warren of streets which the rebels hold in northern Aleppo. “Before the war, Aleppo had between three and four million inhabitants. About two million have been forced out over the last two years," said Erhan Yemelek, local director in the border town of Kilis for the Humanitarian Relief Foundation, a well-endowed Islamist charity (usually known by its Turkish initials IHH) which sends aid to all of what it calls “free” Syria. “In Aleppo’s free areas, there are still probably just under one million," Mr Yemelek said. These are the ones who may flee.

At the border in Kilis, I saw dozens of new arrivals from Syria, pulling suitcases through the border post and waiting for taxis and buses into town. At least 50,000 have fled from Aleppo and the villages to its north since January. Some 40,000 have settled in a camp just inside Syria, but the rest moved into Turkey to Kilis. In the small IHH-aided Dar al Shefaa hospital, civilians were being treated for terrible injuries inflicted by government bombing. Abu Ramadan was standing beside a bed where his two-year-old grandson lay.

“A helicopter dropped a bomb. We heard nothing until the explosion. An ambulance brought us here yesterday," the grandfather said. Half of his grandson’s head was hidden by a bulging white bandage. Abu Ramadan lifted the sheet to show the child’s upper body, peppered with shrapnel wounds. The toddler had his eyes open, but seemed too traumatised even to whimper.

His mother lay in a nearby bed, linked to a drip and with her face also scarred by shrapnel. She stared blankly ahead, hardly aware of a stranger’s presence. Her five-year-old daughter, the toddler’s sister, had been killed in the attack, Abu Ramadan reported. Two other siblings had been left in a field hospital inside Syria, too badly injured to be brought to Turkey.

While anti-Assad Syrian NGOs and private Turkish agencies like the IHH send aid across the border regularly, the UN pays strict adherence to sovereignty. It will not send supplies across Syria’s borders without government permission and this has always been denied.

Policy has now changed and last month a UN aid convoy of some 80 trucks crossed from Turkey into Syria with food, clothes, and blankets for around 50,000 people. “It’s the first time we’ve had permission from the Syrian government. The Turkish-Syrian border wasn’t an option until this breakthrough. It results from a UN Security Resolution," said Laure Chadraoui, a spokesperson for the World Food Programme.

UNSCR 2139 was passed in February with Chinese and Russian support in a rare moment of unanimity on Syria. It “demanded” rather than “mandated” cross-border access and there is no trigger for enforcement if the Syrian government fails to comply.

The convoy, which Assad’s government authorised, crossed to Qamishli in a region of Syria which is controlled by Kurdish fighters who have a de facto non-aggression pact with the Assad regime. Until July, UN convoys brought aid to the region by road from Damascus, but then Islamist groups took control of the road. After that, at much greater expense, WFP organised two airlifts to Qamishli from the Kurdistan region of northern Iraq. In early March, aircraft made 26 trips back and forth, bringing supplies for 81,000 people.

The UN is examining options for other cross-border convoys from Turkey. These would supply people living in rebel-held areas and have to go through border posts which the rebels have seized from the Syrian government. The politics are far more sensitive than the Qamishli aid bridge and would require the Assad government to recognise it had lost control of key areas.

“It would be a big change if the UN chose Syrian implementing partners that are not registered with Damascus. What if armed opposition fighters drove alongside the convoy, waving flags?”, an aid worker told Middle East Eye.

Gaziantep is the main centre for aid operations into the Aleppo area as well as for military supplies to rebel forces there. Yet I could sense none of the cowboy feel that the Pakistani city of Peshawar had during similar cross-border operations by the CIA and Arab governments when jihadi militants were fighting Soviet forces in Afghanistan three decades ago.

One difference is that the Turkish government does not permit foreign officials to live in the city - for security reasons, they claim. “Western spooks and their liaison people with the Syrian opposition have to put up with the hardship of Istanbul and fly down for occasional trips," in the words of one local.

Even without a strong Western presence, except for representatives from a few NGOs, Gaziantep is the centre of a flourishing war economy, fuelled by tobacco, petrol and other smuggling. It is also the safest place in which rebel commanders from eastern and western Syria can meet and co-ordinate their tactics.

Several have bought luxury villas in the city. It is often said that front-line rebel commanders have little respect for the Syrian opposition politicians whom Western officials talk to in Istanbul because they live in five-star hotels. But experience from Gaziantep suggests that internal commanders can be equally prone to living it up abroad. They just do it for shorter periods.

Syria’s war is creating massive economic strains. While some 300,000 refugees live in 21 border-region camps, another 700,000 are estimated to live in Kilis, Gaziantep and other Turkish cities. Tens of thousands are unregistered, which means their children cannot go to Turkish schools. Syrians provide cheap labour across southern Turkey as well as in Ankara and Istanbul in seasonal work and construction. Although many live in overcrowded accommodation, their demand for housing pushes up rents for everyone, and is a source of resentment for Turks.

No wonder that an extra million people from Aleppo would be an extra burden of colossal proportions.