With the clock ticking on a deadline to spare Idlib from a regime attack, Syria’s last rebel stronghold is eerily calm. As violence subsides and the opposition tentatively embraces a ceasefire deal, locals and negotiators alike are hopeful that the agreement will hold – marking a diplomatic breakthrough at a late stage of the war.

It is still unclear whether rebel fighters are withdrawing tanks and artillery from the 15-20 km buffer zone between opposition and regime forces ahead of the 10 October cut-off. Even so, many in Idlib believe that in the eleventh hour of the Syrian conflict, Turkey has come to the rebels’ rescue, and will not abandon them now.

Ahead of the 17 September agreement which gave Idlib a month-long reprieve, the United Nations warned the imminent regime assault could cause the worst humanitarian crisis yet of a conflict already characterised by a staggering disregard for civilian life.

Facebook Twitter Pinterest Syrian children originally from Hama attend a class at a makeshift school for displaced people in rebel-held Atme in Syria’s Idlib province Photograph: Aaref Watad/AFP/Getty Images

“We are preparing for all scenarios,” said Geert Cappelaere, Unicef’s regional director for the Middle East and North Africa.

“[We] welcome the proposals of countries with influence to prioritise the protection of children – including by providing humanitarian corridors that will allow children to access much needed assistance.”

Turkish negotiators are ironing out implementation problems with rebel leaders, said Col Haitham Afisi, commander of the umbrella rebel group the National Army. Some factions fear sacrificing too much territory in the deal, and the opposition also remains deeply opposed to the presence of Russian monitoring troops.

Afisi denied monitor reports that fighters had begun taking heavy weapons out of the proposed zone but added that most factions are “keen” on implementing the deal and are confident it will work.

“I have hope that there will not be any ground attack [by the regime],” he said. “Even if the Russians help them with airstrikes, Assad’s ground army is much weaker than they would like people to believe.”

The buffer zone The buffer zone

The optimism is startling, considering many ceasefires have crumbled in the past after violations by Bashar al-Assad’s forces. The rebels have steadily lost territory since Russia came to the regime’s aid militarily three years ago.

“Turkey will not give up on Idlib,” said Abd al-Hameed Bayoush, a fighter in the National Liberation Front. The 42-year-old from Idlib joined the armed resistance in 2011: over the past seven years he was watched the other rebel strongholds fall, and around 1.5 million people swell the province’s population to 3 million after being bussed by the regime from Aleppo, Ghouta and other defeated rebel areas.

“Assad’s army doesn’t have Iranian support, it is too weak to attack Idlib. That is partly why they will need this deal to work,” he said.

“We are now united here, all the opposition. We have to make sure Idlib remains free.”

The optimism is buoyed by demonstrations across Idlib reminiscent of the Arab spring protests which sparked Syria’s brutal war. Thousands of people have taken to the streets in recent weeks, calling for the removal of the powerful al-Qaida offshoot Tahrir al-Sham (HTS), which controls about 60% of the area.

Facebook Twitter Pinterest Thousands of people waving Free Syrian Army flags and wearing facepaint have taken to the streets of towms around Idlib in recent weeks in anti-regime and anti-Islamist protests Photograph: Anadolu Agency/Getty Images

The fate of radical factions such as HTS remains the deal’s main weakness: the group has so far refused to say whether it will comply. Spokesperson Jawad Abdul Karim said that HTS would not give up its heavy weapons and warned it remains ready to “block any assault by the regime and Russia, who have not been honest in past agreements”.

If HTS sticks to its belligerent rhetoric and refuses to withdraw, Turkey may seek to mobilise moderate rebel factions against them – fighting which could also have dire consequences for the civilian population.

The Assad regime, which in the past has lambasted Turkey for funding rebel factions and allowing fighters to cross the border into Syria, appears to have lent its support to the Idlib agreement.

Earlier this week Syrian foreign minister Walid Muallem told Lebanese Al-Mayadeen TV that his government trusted Turkey to implement the deal. Looking ahead to the end of the war, it will be “necessary in the future to normalise relations” with Turkey, he said.

The ceasefire, if it works, will give Turkey an even more crucial role in determining the future of northern Syria – possibly keeping Idlib under Turkish stewardship and outside regime control indefinitely.

“The deal doesn’t have any detail. I think it was pressure from the Americans to do something quickly,” said local Abdul Majeed Sharif.

“It is worrying there are more points of difference than points of agreement … but we are not left with much choice.”