(CNN) -- After months of bloody fighting, the NATO-backed coalition of rebels is finally advancing on the heart of Moammar Gadhafi's Libyan empire.
The conflict pitted a supposedly professional army against a loose collection of poorly trained farmers, teachers and lawyers equipped with a particularly useful trump card -- NATO airpower.
CNN's Nic Robertson assesses this unlikely alliance and looks ahead to the potential obstacles facing the disparate elements that make up Libya's opposition.
Can the rebels' fight be viewed as a success?
There's an awful long way to go before Tripoli and the rest of the country is secure and there is a leadership in place that represents the wide diaspora of thought within the country. Most people in Libya want Gadhafi gone, but underneath it all there are tribal, factional and ethnic issues within the country that will take some time to address.
We can also look at the lessons of recent history, perhaps Baghdad in 2003, when U.S. troops moved into the city and Saddam Hussein's regime collapsed precipitously. There was a period of wild looting as people rampaged through the city, decimating the industries there. This was almost impossible to put "back in the box."
The next few days in Tripoli are crucial. Can a security structure emerge rapidly to put a curfew in place to allow people's euphoria to express itself, while maintaining law and order? This is a lot to expect in a short space of time.
This is what NATO has been working behind the scenes to try and achieve over the past few months. To try and talk to rebel leaders, to iron out their differences and hear from a wide variety of voices. But as we know there have been many people in Libya that have sat on the fence, waited for Gadhafi to go and are now expressing their opinions for the first time. But will the rebel leadership want to hear from them? Will they want to do business with people that haven't been in the fight against Gadhafi?
The next few hours are hugely important; controlling and maintaining security and stability in Tripoli is going to be key to saving lives and establishing law and order across the country. This didn't happen in Benghazi, in the east where the rebels were. So there's a long way to go.
So what can the rebels expect?
In Benghazi, Libya's second city, they faced pockets of resistance that went on in some cases for months, even when they'd taken control of large parts of the area.
This could potentially happen in Tripoli -- pockets of Gadhafi loyalists who won't give up their weapons without a fight. There will be the notion that these fighters, loyal to Gadhafi right now, will melt away before returning later to mount some kind of campaign -- using roadside bombs or snipers for example -- to try and thwart rebel attempts to bring stability and normality to the capital.
How will the rebels establish security?
This will be difficult when the country's army has ostensibly been fighting for the regime.
Therefore the rebels will have to position people on the streets and give them authority. It will mean people without uniform, people with weapons. It is a scenario that is fraught with potential problems, requiring the rebels -- an incredibly disparate group -- to come together to take control.
Establishing security is what you need to do before you build a political consensus. If not you have chaos, as we've seen in Iraq.
Should we be surprised by the rebel successes?
The rebels have received help from a wide coalition of countries; from western powers including France, the U.S. and UK, to Gulf Arab states such as Qatar.
But any military operation takes time to build. The commitment from NATO has been tentative from the beginning; providing air strikes but not wanting to put any operatives on the ground. Then there were some advisers sent in, before we saw helicopters and then unmanned drones brought in because planes could not be used for targets in urban areas.
The rebels themselves have taken time to establish their weapons supply lines, while they've slowly taken bits and pieces of territory that has allowed them to resupply. So it has taken a while to build the kind of momentum we're seeing now.
The rebels now seem to be able to work more effectively with NATO and what NATO can offer. As journalists we've been inundated with emails from rebels offering co-ordinates for weapons systems belonging to pro-Gadhafi forces. They asked us to pass them to NATO. You can be sure that if we're receiving precise information about targets, then NATO have been getting them as well.
Will NATO view the Libya mission as a success?
NATO has clearly felt the pressure of time politically. We've heard reports of weapons stockpiles running low, so it has had to pull all the stops out and accelerate the campaign to bring some success.
This now appears to be coming to fruition. For example, we've not heard about NATO having other elements that a NATO force would normally expect to have on the ground -- such as forward air controllers -- so it seems as if the rebels have been performing these roles to a certain degree. This points to a greater level of cooperation between the NATO planners and rebels on the ground.
There has been a huge amount of pressure on the coalition leaders to bring this to a conclusion, so they'll be breathing a huge sigh of relief as we enter the final military phase of the conflict.