Immediately following a regime change there's a period known as the 'golden hour' of maximum possibility (coined by James Dobbins in RAND's The Beginner's Guide to Nation Building). The most important aspects of which are to secure the security sphere and implement the rule of law.
Iraq showed how quickly jubilant scenes of celebration on the streets of Baghdad could slip towards lawless anarchy, as opportunistic looters and gangs took to the streets -- this sort of situation must be avoided in Libya at all costs. It is vital that the NTC (National Transitional Council) forces secure government ministries and protect as much of the infrastructure in Tripoli as possible. The preservation of documents, records and institutional memory will be essential in the coming weeks as the challenge of governance replaces the task of toppling Gaddafi's regime.
Given the hierarchical authoritarianism of the Gaddafi government I hope that the NTC will consider working with the civil servants who only worked for his repressive regime because there was no other option. These are the individuals who know how to run the basic services essential to a functioning state -- banking, sanitation, healthcare and oil. If this institutional memory is lost, there is the very real possibility that Libya will take years rather than months to approximate a functioning state. Iraq also showed how seemingly small problems such as a lack of electricity can lead to an explosion in criminal behaviour after dark.
The greatest challenge will be in policing the new Libya. Security sector reform is challenging in any context, but even more so when the previous regime has abused its power, using torture and imprisonment as a political weapon. Tripoli will need police on the streets almost immediately, but the current police will not be trusted by vast swathes of the population and the NTC fighters have neither the experience nor training to police civil unrest. Suddenly their role has changed from freedom fighting to restoring order and policing a population - something that highly trained coalition forces in Iraq struggled to adjust to in the weeks following Baghdad's fall. State records are hugely important in determining what level of involvement soldiers and police had in Gaddafi's repressive regime and will ultimately determine the composition of the new security forces.
I would hope to see either the United Nations or the European Union offer some sort of rapid reaction police advisory force -- which can at least make sure that what is to become the new Libyan army/police avoid serious missteps in the days and weeks ahead. A key part of this sea change in Libya will be assuring Libyan citizens that they no longer have to fear the country's security forces. A time will come to place blame and prosecute those responsible for atrocities under Gaddafi's regime -- that time is not now. Neither is it the time for ad-hoc retribution.
The short-term challenges in Libya are to enforce the rule of law in a period of extreme social instability. This will take decisive action from the NTC and possibly international partners in an advisory capacity. The long-term challenges will be to create a functioning state that includes stakeholders who have little prior experience of governing a country. This may take the form of an international rule of law mission similar to the Eueopean Union's EULEX mission in Kosovo who can aid the NTC in ratifying a new constitution and installing a functioning judicial system. Right now what matters most is to quickly establish a new standard that no individual or group is above the law. That in itself will demonstrate to every Libyan that things are forever changed.