There is nothing like a common enemy to unite old foes but the speed and manner of the rebel advance on Tripoli has been astonishing.
NATO’s bombing campaign may have evened out the battlefield against Gaddafi’s troops giving the poorly armed and ill-equipped forces the chance to take the capital.
But only last month divisions and disarray threatened to rip the rebels apart.
The murder of the rebel army chief, Abdul Fatah Younis, exposed the difficulties for Libya’s future government.
The former right-hand man to Gaddafi was a high-profile defector. There are continuing claims that he maintained ties with the regime and his alleged assassination by Islamic militants is still under investigation.
His death sent shockwaves through the coalition but the leader of the National Transitional Council, Mustafa Abdul Jalil, managed to keep his key foreign supporters on side.
More than 30 governments have recognised the NTC as the legitimate power in Libya but since General Younis’ death, Jalil has sacked the cabinet and not assembled another, a subject that has caused further friction with tribal leaders.
Some accuse Jalil of not having the authority to speak for all Libyans, and they say his failure to name a new cabinet proves it.
Unless he can unite the rebel factions, long simmering grudges sharpened by the war may prove to be divisive in Libya’s post-Gaddafi era.