(CNN) -- Freshly liberated from the threat of deposed ruler Moammar Gadhafi, Libyans now face the arduous challenges of repairing the war-ravaged country and building a democratic system from the ruins of a four-decade dictatorship.
"This is a time to start a new Libya, with a new economy, with a new education and with a new health system -- with one future," said Mahmoud Jibril, chairman of the National Transitional Council's executive board. The NTC is Libya's interim government.
On Friday night, more than 24 hours after Gadhafi's death, the streets of Tripoli still echoed with the sounds of celebratory gunfire, car horns and cheers.
In Misrata -- a city scarred by attacks during the Libyan war -- drivers leaned on their horns and came to brake-squealing stops as bands of revelers darted in and out of traffic.
The long job of restoring Libya will formally commence this weekend with a declaration from the National Transitional Council, said Ian Martin, the U.N. special representative for Libya.
"The formal timetable laid down by the NTC begins with the declaration of liberation," Martin said. "The clock begins ticking and we'll be working with them to try to make their commitments feasible in practice."
The commitments are myriad.
The NTC must treat thousands of people wounded in months of fighting, rebuild the war-ravaged country, disarm militias, restore basic services and decide how to pursue justice against Gadhafi regime officials accused of wrongdoing during the former Libyan leader's 42 years of rule. And they must do that while trying to create a functioning democracy from whole cloth in a nation with no democratic tradition.
"It's a very big challenge of course, but I think they're entitled to some time to address that," Martin said, urging governments around the world not to rush to be skeptical of the NTC's commitment to democracy.
Fawaz Gerges, a professor of Middle Eastern politics at the London School of Economics, said Libyans still face a difficult political struggle.
The recent fighting around Sirte and Bani Walid -- another holdout of pro-Gadhafi loyalists -- exposed "some major tribal and regional cleavages" that Libyans will have to bridge in forming a new government, he said.
Those differences "could easily escalate, given the extent and the intensity of differences in Libya."
Shashank Joshi, an associate fellow at the Royal United Services Institute in London, said a key division is between Libya's Islamists -- who themselves are fragmented internally to a degree -- and "everyone else," he said.
The transitional authorities will also have to work out how to incorporate former regime loyalists and technocrats into the new Libya, he said.
"The Islamists were oppressed under Gadhafi and have participated in some of the toughest fighting, so they think it's unfair if they do not have a share in power while others -- who may have been party to their oppression in the past -- do," he said.
Then there is the matter of consolidating control over the country's security situation.
"This means ensuring consensus not only at the top of the rebel coalition, but also ensuring that low-level criminals and gangs don't take advantage of the weapons that are still circulating to threaten the safety of Libya's civilian population," said Christopher Chivvis of the RAND Corp., a nonprofit institution that seeks to improve policy and decision-making.
The NTC has a plan to reintegrate fighters into civilian life, said Mohammed Sayeh, a senior member of the NTC.
"They will have to go back to their job," he said. "Libya is liberated. Now Gadhafi is not here anymore. So most of them will go back to their previous profession, whether student or a doctor or other things."
Those who don't want to return to civilian life will be absorbed into the military or security services, he said.
Meanwhile, NATO is expected to end its role in the Libyan conflict. NATO Secretary-General Anders Fogh Rasmussen announced Thursday that the alliance "will terminate our mission," launched in March under a U.N. mandate to protect civilians. NATO's efforts have included strike sorties and airstrikes targeting Gadhafi's military resources.
NATO leaders were scheduled to meet Friday to discuss their next steps.
Libya's new leadership will need to find ways to deal with the thousands of people wounded in the fighting.
Some U.S. officials have urged the Obama administration to send a Navy hospital ship to Tripoli or, as U.S. Sen. John McCain suggested Friday, fly some of the wounded to a U.S. Army hospital in Germany.
The NTC also has to tend quickly to the populace's basic needs, such as water and power, to bolster its legitimacy, analysts say.
Revenue from Libya's oil will go a long way toward that end.
The country is already producing an estimated 350,000 barrels of oil per day, up from near zero during the depths of the conflict.
Libya could probably double its current production relatively quickly, which at current prices might fetch $80 million or so a day on the open market, analysts say.
But a return to its prewar output of 1.6 million barrels a day -- which could net hundreds of millions of dollars a day -- would involve slow, complicated work.
The Libyan leadership also is lobbying for the release of what some analysts believe to be as much as $150 billion in frozen assets that had been available to the Gadhafi regime around the world.
Those assets range from real estate to stakes in the Italian bank UniCredit; the British publisher Pearson, which owns the Financial Times; and Italy's soccer club Juventus.
Even before Gadhafi's death, the U.S. Treasury Department had already started thawing some $37 billion worth such assets to make them available to the new government in Tripoli.
The department also partially lifted some Libya sanctions, opening the door for U.S. companies and individuals to do business with the Libyan National Oil Corp. and other companies in Libya.
World leaders expressed encouragement for a new Libya but cautioned that the road ahead won't be easy.
"In the coming days, we will witness scenes of celebration, as well as grief for those who lost so much," U.N. Secretary-General Ban Ki-moon said. "Yet let us recognize, immediately, that this is only the end of the beginning. The road ahead for Libya and its people will be difficult and full of challenges."
Gadhafi's killing caps a revolt that began in February and left him a fugitive for the past two months. The mercurial former army officer, who seized power in a 1969 coup, was the third Arab leader ousted in the Arab Spring upheavals that began in neighboring Tunisia in January.
CNN's Dan Rivers, Mohammed Tawfeeq and Ingrid Formanek reported from Tripoli, Libya; Chris Lawrence, Barbara Starr and Jennifer Liberto reported from Washington; Laura Smith-Spark reported from London; and Steve Hargreaves and Carol Costello reported from New York.