Syrian rebel fighters are at last allowing themselves to believe what seemed unthinkable just a few weeks ago. After a bloody three-week siege of Damascus, they are so confident that they may be on the brink of seizing the capital that they are allowing themselves to consider what would happen in the chaotic aftermath of a victory.

And it is not just in Syria that anxiety is growing about what might follow the fall of the beleaguered Syrian regime. Fear is growing among its neighbours, too, about what might then ensue.

The security establishment and presidential palace, so far unbending pillars of state control, are now well within reach, rebel fighters on the outskirts of Damascus say. But to hold on to the city once it falls, they believe, means turning their minds to what comes next.

"This time, unlike July [the last co-ordinated assault on Damascus], the regime are not fighting like they were," a rebel leader from Darrya, near the capital, said. "They are shelling us from the mountain and bombing us with jets. But they seem cautious. We are dictating terms."

The southern outskirts of the city are now firmly guerrilla territory. Rebel groups are openly trying to disrupt flights to the nearby international airport. "It is a strategic target and we need to control it," the rebel leader said. "We must use big ideas these days."

Even on the sidelines of the war, positions are being shifted from trying to manage the consequences of the fighting to coping with what could be its shambolic aftermath. In Ankara, plans are now well under way to deal with a post-Assad Syria. Analysts in the Turkish capital believe that President Bashar al-Assad will be gone by the summer. Turkey's military and security leaders say that they cannot envisage a scenario with Assad still in power this time next year.

While the end appears to draw inexorably nearer, chaos has taken the Turkish military close to a war footing. Add to the mix the bellicose rhetoric of political leaders and the imminent arrival of Nato Patriot missile batteries, along with 400 German troops to man them, and there is little to suggest that Syria's giant northern neighbour won't play a leading part in the next chapter of the Syrian drama.

Cross-border issues seem sure to feature if and when Damascus falls. What hand Syria's Kurds will play if state control collapses and what will happen to the remains of Syria's arsenal of conventional and chemical weapons dominates security discourse in Ankara. Turkey says Syria has close to 700 missiles, including long-range Scuds, that it fears could be used to attack its cities if the regime chose to mount a last stand.

The regime's supplies of sarin and mustard gas have also loomed large in both Turkish and western calculations. "We know where their missiles are located and how many they have," Turkey's foreign minister, Ahmet Davutoglu, said during the week, adding that officials were closely monitoring the whereabouts of chemical stockpiles. "We have a very precise understanding of their chemical programme," he said.

Security officials in Ankara say they are now reaping the benefits of their former close ties with key regime personnel, formed at a time when Turkish leaders were trying to draw Assad into their influence. But the attempts led by the prime minister, Recep Erdogan, to mentor the young dictator are now widely seen in political circles as having been a mistake. "In Assad's eyes, all that he did is legitimise his ways," one senior Turkish bureaucrat said. "He was his father's son after all. His strategy was to appear to be more flexible and enlightened than his father, but to use that illusion to do the only thing he intended to do, consolidate his power. He liked being courted, but he never intended to reform."

Illustration: Observer Graphics

The belief in Ankara among those who shared five years of close bilateral dealings with Assad and his key security officials is that the Syrian leader is now isolated and confused, unable to lead himself, or his regime, out of crisis. "He is a weak man, easily influenced, and not capable of making his own decisions," said one official who had dealt regularly with Assad until August 2011. "His mother has a heavy influence over him. If she is out of the picture, it could be problem solved."

Assad's mother, Anissa Makhlouf, the wife of the late dictator Hafez al-Assad, who died in 2000, has remained a powerful though invisible figure throughout the rule of her son. According to senior defectors – among them former prime minister Riad Hijab and member of the inner sanctum General Manaf Tlass – Makhlouf is the matriarch of the regime, an uncompromising woman with singular views on how to deal with dissent. "She has the ear of her son," the Turkish official said. "He listens to her more than anyone."

Despite the steady disintegration of so many of the ties that held Syria together for four decades – fear being one of them – the regime's two leading families, the Assads and the Makhloufs, so far appear to be holding together.

Apart from a feud in the Alawite village of Qardaha in August, which reportedly led to the death of Assad's younger cousin, Mohammed, neither the regime's friends nor its foes have credibly pointed to splits in the inner sanctum or the immediate security establishment that directly serves it.

Sources in Ankara, Beirut and Moscow all strongly believe that Assad's younger brother, Maher, the leader of a key army division, continues to play a military role despite losing a leg in the bombing of a security headquarters in central Damascus in July that killed a key intelligence chief, Assef Shawkat. "Maher is crippled, but he is still functioning," the senior Turkish official said. "The reports have been very consistent on this."

As what appears to be a final battle for Syria approaches, Turkey is drawing on the lessons of a long and often fraught past with its southern neighbour. "We gave his father an honourable exit in 1998," the official said of a feud over Damascus's sheltering of the Kurdish militant group PKK's leader, Abdullah Ocalan. The standoff took both countries to the brink of war.

"Now Assad is like a cornered cat. You don't know how he is going to react. Anything is possible now. We must all act wisely and do nothing on impulse. There is too much at stake."