Many Libyans I’ve met in the past few months have told me that before their revolution, they felt no pride in telling outsiders where they came from. They understood that the rest of the world knew only one thing about their country—that it was ruled, depending one’s perspective, by a madman, a monster, or a clown. 

The foreign media were fascinated by Qaddafi’s image—his clothes, his female bodyguards, his tirades before the U.N. Foreign governments equated Libya with Qaddafi —all that mattered to them, depending on the decade, was to keep him in his tent, or to get inside and win his favor. If there was a unifying theme to the Libyan uprising, a common thread that ran through all the slogans the revolutionaries sprayed on their walls and shouted in their marches, it was, “We are not Qaddafi.” It’s a message that suggests both the promise of the Libyan revolution, and its peril.  

In the early days, when few believed they had hope of winning against his war machine, many Libyans felt they had already emancipated themselves simply by proving that they could think and act independently of their leader, that they could be the authors of their destiny, rather than bit players in his. In every way possible, they sought to dissociate themselves and the image of their country from Qaddafi and from everything Qaddafi believed. And in this they have succeeded.

But in some ways, their effort to cast Qaddafi as alien, even foreign, went too far. Qaddafi could not have ruled for 42 years without the complicity of at least some other Libyans. Yet many of his countrymen found it hard to accept that the men fighting for his regime were, in fact, Libyan; hence the widespread belief that Qaddafi’s troops were mostly sub-Saharan African mercenaries, and the persecution of African migrants and some dark skinned Libyans that ensued. Many may now be tempted to believe that everything that went wrong in Libya over the last 42 years was the fault of one man—and that having killed a dictator, they have rid themselves of dictatorship. But nothing is ever that simple.

The Libyans do have an extraordinary opportunity today. Unlike in Egypt, where the young revolutionaries of Tahrir Square are still on the outside looking in, forced to negotiate with an all-powerful military, Libya’s opposition activists now run their country. They will be drawing on a blank sheet of paper, constructing new institutions, and in some ways a new society, from scratch. They at least have a chance to build a state that resembles their ideals.

There is an opportunity for Libya’s foreign partners, too. Most Libyans are grateful to the West for the help it provided them yet also face the world with a healthy pride that comes from having largely liberated themselves. Most Libyans I’ve met—from secularists to Islamists—want to live normally, to rejoin the world from which Qaddafi isolated them for so long.

But they won’t get there if all they do is remove the architect of their police state. They also have to remove the architecture. The young men with guns who are now a law unto themselves on the streets of Libya’s cities need to be demobilized, or brought under the full control of Libya’s civilian leadership and institutions. Communities suspected of supporting Qaddafi should be seen as part of the Libyan family, and not punished collectively. People who committed crimes should be brought to justice with all the rights of due process that Qaddafi denied his enemies. 

The signs that Qaddafi may have been executed by the fighters who captured him, and the evidence that torture persists in the prisons run by Libya’s rebel militias—despite all the fine words from their leaders about avoiding revenge—do not bode well. For if Libya’s new authorities abuse their power to punish those associated with the Qaddafi regime, they will eventually abuse it to persecute other, more democratic political adversaries. And if that happens, Libya will not have changed.

Most Libyans I know, though clearly not all, understand that it is not enough to depose a dictator or destroy a regime. They see that their challenge now is to build a country of laws and institutions. That would be their true triumph over Qaddafi—the best measure of their separation from his legacy. And it is a miracle—brought about by their sacrifice and the support of the international community—that such a triumph is now possible. But Qaddafi’s death does not assure it. Its celebration, if anything, risks masking the true nature of the challenge ahead.

Tom Malinowski is Washington Director of Human Rights Watch.