CAIRO — Consolidating the swift and dramatic capture of Tripoli is only the first of myriad obstacles the rebel leadership must overcome to build a democratic Libya from the rubble of Moammar Gadhafi’s rule, analysts said Monday.

In a region rife with cautionary tales of failed democracy experiments, Libya’s National Transitional Council seeks to build the exception – an Arab state with an inclusive government, a commitment to human rights, and legitimacy at home and abroad.

The council members’ success, experts said, hinges on whether they can prevent a campaign of score-settling and persuade Libyans to unite around their shared experience of life under one of the world’s most capricious dictators. How the rebels treat members of the former regime – such as deciding whether to prosecute them in Libya or through referral to the International Criminal Court – will be an early test of their principles.

“Truth and reconciliation is going to be necessary, but it’s also going to have to be forgiving and generous,” said Lisa Anderson, president of the American University in Cairo and a well-known expert on Libya. “There’s no other way. Most of the people who stayed in Libya managed lives for their families by doing things that in the light of day they’d just as soon not talk about.”

Securing the capital and its environs is at the top of the transitional council’s to-do list, with a focus on preventing revenge killings by jubilant foot soldiers in their newly won territory. By late Monday, the council estimated that 95 percent of Tripoli was under rebel control, with clashes still under way in the last regime-held districts.

Human Rights Watch already has documented episodes of rebels engaging in vengeful violence, though the council’s overall commitment to human rights is “wildly impressive,” said HRW special adviser Fred Abrahams. He said the potential for a revenge spree remains high as Gadhafi’s regime crumbles and loyalists melt back into the population.

“People are furious, angry, and have legitimate gripes and grievances against the dictatorship,” said Abrahams, who was in Libya earlier this month.

Mustafa Abdul Jalil, head of the transitional council, threatened to resign if revenge acts proliferated. Abdul Jalil said he trusts the leaders of the rebel forces but is concerned they’ll be unable to control their troops.

“The actions of some of their followers worry me,” Abdul Jalil, a former justice minister, admitted at a news conference Monday in the rebels’ eastern capital of Benghazi.

On the political front, opposition leaders will have to cobble together an interim government that gives ample space to two key constituencies, analysts said.

The first is young Libyans, who were at the forefront of demonstrations. Demographic studies show that 75 percent of Libyans were born under Gadhafi’s rule; he’s the only leader the vast majority of citizens have ever known.

The second key constituency is the Islamists, a category that encompasses both seasoned jihadists who fought in Afghanistan and Iraq but also a new generation of Libyans who are “much more politically Islamist and much less cosmopolitan” than their parents, Anderson said.

At the same time, Libya’s interim leaders will be expected to build a civil society in a scarred nation that for decades was governed by Gadhafi’s singular “jamahariya” system that decentralized power to prevent the rise of political rivals. Even before Gadhafi, no democratic tradition existed in Libya; his predecessor was a British-backed king whose reign was interrupted by Italian occupation.

“Now, as we see the very end of Gadhafi’s tyranny and the beginning of a new Libya, it’s important to emphasize the principles of respect for human rights, the respect for justice that the Transitional National Council has promised to all the Libyans,” said Jeffrey Feltman, U.S. assistant secretary of state for Near Eastern affairs, said in a statement while on a trip to Cairo.

NATO’s bombing operation helped clear the way, but it took disparate groups of Libyans from across the country to bring down the regime.

Fighters advancing from Benghazi, the eastern cradle of the rebellion, had to rely on their loosely affiliated comrades in the western part of the country to breach the capital.

The joint victory means the Benghazi-based transitional council will have to share power with the Tripoli opposition, about which little is known because of Gadhafi’s brutal crackdown on dissent in the capital during his final days in power. The council is expected to move its headquarters to Tripoli once the capital is secured.

“The people in Benghazi know perfectly well that the success of the next few months depends on what they do in Tripoli,” Anderson said. “They can’t afford to lord over the people of Tripoli that it started there. Nobody can take full credit for the whole thing.”

Crafting a foreign policy will be yet another challenge as foreign governments and corporations eagerly await the chance to open shop in Libya, some lured by the prospects of the country’s vast oil wealth and others eager to guard Western interests in the region by ensuring a moderate, friendly Libya emerges.

Under criticism in some quarters for its reliance on NATO’s firepower, the council must also persuade other Arab states to recognize it as the legitimate government of Libya.

“We are on the threshold of a new era,” Abdul Jalil said. “We are on the threshold of a new stage where we’ll work to establish the principles of the revolution: freedom, democracy, justice, equality and transparency.”

Still, many Libyans are angry at the International Criminal Court’s pressure for the transitional council to hand over members of Gadhafi’s family for prosecution.

Consiering all that they’ve endured – deprivation under sanctions, humiliation on the world stage and no civil liberties to speak of – Libyans are demanding their former rulers be tried on their own soil.

“We should not rush to the ICC,” Ibrahim Sharqieh, deputy director of the Brookings Doha Center, told Al-Jazeera English. “Everything should be Libyan and run by Libyans.”