Just one week ago, the rebels who controlled the last few neighborhoods of Aleppo that remain in opposition hands found themselves surrounded and running out of time. The Syrian government and its allies had surrounded what was once Syria's largest city and the country's financial capital. Many feared a humanitarian disaster would unfold, and the regime's recapture of Aleppo would be a devastating blow to anti-Assad forces who do not have full control of a single major city in all of Syria.

Today, the situation is very different.

On August 6, rebel forces broke through the walls of perhaps the most important military base in all of northern Syria. As I explained for The Interpreter on August 1, the Ramouseh artillery base and academy has served as the foundation of the Assad regime's control of Aleppo city -- and with it all of Aleppo Province -- since the city was first attacked by rebel groups in 2012:

The Ramouseh artillery base and academy was the key to maintaining some control in Aleppo for the Assad regime between the summer of 2012 and today. The artillery units there were crucial to [intimidating protesting students], and later in the regime's efforts to flatten the Hamadaniyah and Salah el Din districts just north of the base. The artillery turned regime strongholds into death traps, transforming the battle for Aleppo into a game of inches waged by snipers, artillery, and aircraft. Since regime forces were often outnumbered over the course of those years, this leveled the playing field.

The victory may relieve the humanitarian situation in Aleppo (though this remains to be seen). Furthermore, if the base falls and the regime does not quickly recapture it, Assad could be in danger of losing all of Aleppo. This battle is a testament to how weak the Assad military has become. Even with direct support from the Russian Air Force, tanks, and troops, as well as militants from Lebanon, Iraq, and Iran, Assad may have just snatched defeat from the jaws of victory.

How, then, does he ever hope to restore order to Syria?

But this battle also comes at a price -- a key Al-Qaeda-linked group has helped spearhead the attack on the city. Operating under the umbrella organization Jaish al-Fatah, Army of Conquest, the newly rebranded Al-Nusra Front, now Jabhat Fatah al-Sham, used suicide sappers and tunnel bombs to break open the Syrian Army's battle lines and main defenses, through which various rebel groups are now streaming. As David Patrikarakos explained for RFE/RL on August 4, while many more moderate rebel groups also played very important roles, Al-Qaeda's leading role may impact the entire trajectory of the war moving forward.

As history has shown us, without a singular leader, and without unified and consistent outside support, whichever group wins battles usually becomes the banner carrier on Syria's battlefields. History shows us that victory is the key for Syrian rebel groups. To see this in action, we should look to the beginning of the crisis.

Protesters first took to the streets against Syrian President Bash al-Assad in March 2011, starting the Syrian chapter of the regionwide protest movement that had already swept through much of the Middle East. At first, the demand was not the removal of the president but instead a series of pro-democratic reforms. Those protests were met with violence. As more cities and towns took to the streets and the protests in each one of them grew larger, so, too, did the violence against the protesters grow more intense.

First, protesters were arrested and beaten, then teargassed, and then they were shot at. As members of the military and police grew disgusted by their orders to shoot unarmed civilians, those who did not follow orders were also attacked by the military. By the summer of 2011, regime defectors were hiding in the deserts and mountains, and the battle for the future of Syria began.

By February 2012, the protest movement in Syria was making its final transition into a full-blown civil war. By this time, Homs, a working-class city in the center of Syria, was in full rebellion. Assad, in direct contradiction to his agreement with the Arab League, deployed his tanks and artillery to the city. The death toll exploded, and even peaceful protesters began to realize that Assad would stop at nothing to kill all those who opposed him. For many Syrians rebels whom I've spoken with over the years, the siege of Homs was the moment they realized that there was no peaceful solution to the conflict. It was time to take up arms.

Despite what Syria has become, it might come as a surprise to many that at this time there were effectively no armed groups that had an obvious jihadist or Salafist ideology. Syria was a secular country with a secular military, most rebels were former military or police, and despite being driven to take up arms, they were not particularly interested in overthrowing their government, much less installing some sort of Islamic caliphate, the stated goal of groups like Al-Qaeda and the self-proclaimed Islamic State (IS), which were relative latecomers to this crisis. What Western leaders often refer to now as the “moderate opposition” made up nearly the entirety of the opposition back in early 2012.

But already there were rumors of “bad men” among some rebel groups. Syrian activists whom I consulted at the time, both nonviolent activists and rebels, warned of a group that was increasingly popular with both rebel fighters and some citizens alike – the Al-Farouq Brigade. At a time when most of the armed opposition simply identified as the Free Syrian Army (FSA), Farouq took its own name. It operated under its own orders, often overruling other FSA fighters and commanders in the area around Homs. The rumors quickly spread, some propagated by the Assad regime and others by rival rebel groups or scared civilians, that it was ruling Homs like a mafia state, collecting taxes and intimidating the populace. More than anything, though, the Al-Farouq Brigade was more committed to doing whatever it took to defeat Assad. It was the first rebel group to focus on taking and controlling inhabited cities and towns, and it preferred to take the fight to Assad in offensive battles.

The group's reputation soon grew because it was winning, and because it was taking the initiative. Many FSA fighters saw their leaders as weak and indecisive, and so Farouq was a welcome alternative.

Success bred success. The more battles it won, the more popular the group became.

But the Al-Farouq Brigade was still part of the moderate opposition. Soon, another group was gaining prominence in northern Syria -- the Al-Nusra Front, Syria's Al-Qaeda affiliate. Al-Nusra started as little more than a YouTube video in January 2012. By taking credit for terrorist attacks, some of which it may not have even perpetrated, Al-Nusra soon proved that it, too, was capable of doing what it took to win. Its radical Islamic ideology allowed it to motivate its followers behind a religious objective – the destruction of the government of the Alawite sect and the construction of a Sunni Salafist caliphate. Its adherence to Shari'a law, not pro-democracy ideals, gave it an excuse to dictate orders from the top, rather than seek consensus, which made its leadership, its rule, appear stronger than it really was.

Soon, Al-Nusra had a new rival, Islamic State, which was even more focused, even more brutal, and even more successful on the battlefields of Syria. By early 2014, the most extreme members of the Al-Farouq Brigade, perhaps sensing their own obsolescence, had joined one of these more successful and bloodthirsty groups, while still more members of Al-Farouq joined less radical groups that still had a strong religious identity, reducing the group to one that is now of limited importance. Other Free Syrian Army units are still numerous, but their leadership is more splintered and their ideology, while relatively moderate, is less iconic, less unified, and much harder to define.

After five and a half years of war, the Assad regime, not any terrorist group, is responsible for the vast majority of the deaths in Syria, and an even larger number of the refugees who have fled the constant killing. Groups like Al-Nusra and Islamic State rely on their history of defeating the Assad regime and restoring law and order, even if it is a barbarous order, as their main tools of controlling the people and attracting new members.

When Al-Nusra's suicide bombers opened the way for the opposition to win key bases in Idlib Province, it became the dominant force in that region. When IS's path of bloodshed led to its victories in Syria's east, it was soon able to consolidate territory and declare its caliphate.

There is a real danger that, unless they score a major win soon, moderate groups in Aleppo Province could also give way to groups with more radical ideologies, such as the victorious Jabhat Fatah al-Sham, with all of the problems that such a development would entail.