The death of deposed Libyan leader Muammar Qaddafi and the fall of his last two loyal towns mark the end of the revolution that has rocked the country for eight months. While Qaddafi’s defiant messages urging his supporters to “fight in every valley, in every street, in every oasis and every town,” and clashes in loyalist cities of Bani Walid and Sirte in recent weeks led many Libyans to doubt the new leadership’s claims that the war was nearly over, the events of this past week have dispelled these fears.

Now, Qaddafi’s successors should turn their focus to rebuilding and reunifying the war-ravaged country. To do so, they will have to gain the trust of those groups that refused to support their revolution. This will require an astuteness that post-Qaddafi politicians have preached, but that fighters on the battlefield have largely ignored.

The first challenge posed to the rebel leadership, known as the National Transitional Council (NTC), will be to prevent the brutal manner of Qaddafi’s death from turning him into a martyr. It comes as no surprise that Qaddafi fought to the death in Libya. As I have argued since his capital of Tripoli fell in August, the disgraced leader was unlikely to flee his native country to seek shelter with neighboring allies. Qaddafi fervently believed that the 1969 revolution that brought him to power was divinely ordained and destined to remake his country and the greater Arab world. He considered the current revolt a direct challenge to his vision—a Western-led conspiracy to depose him, using Islamists affiliated with Al Qaeda. In February he declared “I will not leave the country and I will die as a martyr at the end,” and urged his supporters to emulate his resistance.

Those Libyans who remained neutral as rebels clashed with Qaddafi forces are likely to be troubled by the manner in which he died. Footage filmed by his captors shows him bloodied and dazed, yet alive—apparently fulfilling his February promise. Already, there are discrepancies in the story of his final hours that may further propel the narrative of his martyrdom. The NTC announced that he died from wounds while en route to a hospital, though other reports have surfaced that he was shot in the head at close range, possibly while on the way to a medical facility. In a region where conspiracy theories flourish, Libyans who are uncertain of their feelings toward the NTC are sure to be skeptical of its official account and disturbed by the likelihood that he was murdered rather than given a fair trial.

Qaddafi’s death in rebel custody is also likely to heighten the fence-sitters’ sense that the efforts of politicians and militias are uncoordinated. Many Libyans fear the NTC cannot discipline the militias that are nominally under its control, the primary evidence being the council’s failure to ensure Qaddafi’s safe transfer to civil authorities. The episode is likely to reinforce the pervasive belief that the revolution has intensified everyday security fears. Many in Tripoli lament the proliferation of rebel pickup trucks laden with anti-aircraft guns and anti-tank canons. Parents are angry that they cannot take their children to Qaddafi’s former compound or Martyrs’ Square without hearing the harrowing sounds of Kalashnikov rounds. Others complain that rural areas outside the capital are not safe to visit at night. To earn the fence-sitters’ respect, the NTC must demonstrate that it is in firm control of the country and can reestablish the security Libyans took for granted during the Qaddafi era.