The manner of Gaddafi's killing raises questions for the militias that make up the new Libya, writes Andrew Gilligan in Sirte.

The highway from Benghazi to Sirte was the Libyan revolution's battleground and success gauge: the road it drove up, retreated down, drove up again, then got stuck on for months; the road, this Thursday, on which it trapped and killed Colonel Muammar Gaddafi.

All along the revolutionary road, less than 48 hours after that final triumph, we found something unexpected: a smidgeon of sympathy for the dead dictator.

In Benghazi, on the main square where it all started, they were slaughtering camels in celebration. There they sat, eight of them, feet tied so they could not move, quivering with fear as they were beheaded one by one. As soldiers fired rifles in the air, members of the cheering crowd held up the severed heads as trophies. They daubed their hands in the camel-blood, and gave the V-for-victory sign with dripping fingers.

But away from the square, the birthplace of the revolution was not in party mood. The streets were fairly quiet. And in the cafes, people were watching TV pictures - more graphic than any shown in Britain - of a bloodied Gaddafi dragged along and beaten, feebly protesting, before a gun was put to his head.

The picture then cut to the dead ex-leader being rolled onto the pavement, blood pooling from the back of his skull.

"He deserves to die, but not in this sort of way," said Mohammed Hamed, one of those who saw the images. "It's haram [forbidden in Islam] the way they treated him.

"He was a prisoner and should have been treated as a prisoner."

By last week, the empire of the self-proclaimed "emperor of Africa" had shrunk to the size of a drainpipe. His army had shrivelled to a handful of cars.

But the one thing Gaddafi retained to the very end was his ability to put on a show. Other Arab dictators - Tunisia's Zine el Abidine ben Ali, Egypt's Hosni Mubarak - slipped away into the night. Gaddafi's demise was as box-office as his 42-year rule.

Fascinatingly, some of the most gruesome images were apparently distributed by Al-Rai, the regime mouthpiece TV channel that aired the colonel's messages of defiance after losing power in August.

In the last one, only two weeks ago, he urged his followers to "rise up, raise our green flags to the skies and go and march in your millions in all the squares."

That, we can safely predict, will not be happening. Past us on the road to Sirte streamed thousands of revolutionary soldiers in the opposite direction, jubilantly returning from the front line to their homes for Sunday's planned day of national celebration. Even the field hospitals were pulling out. That war is definitely over.

But Gaddafi was not, as a government minister claimed only three weeks ago, hiding on the Algerian border. He did not take a four-by-four through the irrigation tunnels of his Great Man-Made River to some luxurious desert lair. Maybe such Hollywood stuff never happens in real life - Saddam and bin Laden died in humble circumstances too.

Maybe Gaddafi was only in Sirte because he had nowhere else to go.

But the fact is that he was found at the scene of the revolution's last battle, a fight which turned out to be among the war's most savage.

Before it was known he was in Sirte, the commander of the Nato air campaign, Lt-Gen Ralph Jodice, spoke of his "surprise" at the "tenacity" of the pro-Gaddafi forces holding the city, saying: "It's quite interesting how resilient and fierce they've been." Yesterday, the fact that he kept his promise to go down in - or at least near - the fighting was earning him a certain amount of respect.

"He had his gun with him. He was involved in the fighting," said Mohammed al-Nour, from the city of Ajdabiya. "I hated him but he did not run away."

Whatever al-Rai and the last loyalist handful may want, of course, the colonel will not be remembered as a martyr. He was despised by Libyans, who are overwhelmingly pleased to see him dead.

"We could not even say his name without fear," said Ali Barzani, a car dealer. "Now we are watching his body on television. This is a great day."

But Gaddafi's death is already showing up some of the weaknesses of Libya's new rulers.

The claim by the interim prime minister, Mahmoud Jibril, that he was killed in "crossfire" looks ever more false with every new piece of video.

Both he and his son Mutassim were alive when captured, and dead soon after. A statement by an anonymous NTC source that "they beat [Gaddafi] and they killed him" seems closer to the mark.

But Mr Jibril angrily rejected demands by the United Nations and some in the West for a proper investigation into the circumstances of Gaddafi's death.

"People in the West don't understand the agony and pain that the people went through during the past 42 years," he said.

The dictator's treatment - before and after death - underlines that Libya does not have a government, or a state with functioning standards, only a collection of militias.

After he was killed, his body was taken by the Misurata militia and put on display in a shopping centre, where yesterday the corpses of his slain son Mutassim and Gaddafi's army chief, Abu Bakr, were placed alongside.

Libyans from hundreds of miles away came to queue up and, some wearing gloves and masks, view the three bodies.

But the National Transitional Council, the supposed ruling body, was yesterday having a very hard time getting its hands on Gaddafi's corpse, or agreeing with the Misuratans how it should be buried.

On Saturday there were reports that it would be passed to the Gaddafi family.

What this meant was not entirely clear, since all of his immediate relatives are either dead, in exile or - in the case of his son Saif - still on the run. The apparent announcement came as Al-Rai TV said relatives wanted the body handed over.

"We call on the UN, the Organisation of the Islamic Conference and Amnesty International to force the NTC to hand over the martyrs' bodies to our tribe," the station proclaimed on the family's behalf.

Most of the militias are based on a particular town, financed and commanded largely autonomously. Gaddafi's death means that the main thing which united them - the war against him - is over. Now, the many rivalries and disputes between them, and between them and the NTC, may come to the fore.

Those involving Misurata will be particularly fierce.

This port city, the country's third largest, became the hero of the revolution when it withstood an horrendous three-month siege from Gaddafi forces. In the battle for Tripoli, it was Misuratans who largely conquered Gaddafi's Bab al-Aziziyah compound.

Understandably, they have a very high opinion of themselves. "[The revolution] was teamwork," says Suleiman Fortia, a spokesman for the Misurata Brigade. "But we deserve the cup."

The Misuratans have almost established their own independent enclave, a kind of inverse Sirte: no Libyan from outside the city may enter it without a permit.

And the "cup" they want for their revolutionary endeavours is none other than the prime ministership of Libya for their commander, Rahman Swelhi. "Towns that suffered should have a greater voice," says Mr Fortia.

As for Mr Jibril, "We will never accept him. He should do the honourable thing and just vanish." Mr Jibril replies that the Misuratans do not seem to understand democracy.

"Fighting and strength is not a measure for representation in government," he has said. "Representation is a right guaranteed to all of us."

But the NTC is indeed going to vanish: Mr Jibril, along with the rest of the council, have already said they will serve only until elections in eight months' time, and he repeated that yesterday. Eight months is quite enough time for political disputes to fester and harden into something more serious.

Other places, too, are fighting for their share. Zintan, a town of just 70,000 in the Nafusa mountains that played an important part in the liberation of Tripoli, wants two cabinet posts, including the ministry of public works, coveted for its bribe potential. Benghazi's reluctance to celebrate too hard may reflect increasing anxiety about its own place in the revolution.

"Don't forget we carried the weight of the country at a difficult time," says one of its NTC members. Most of the militias, despite appeals, have refused to leave Tripoli, where each controls its little area of the city.

Abdulhakim Belhaj, the Islamist commander in charge of the capital's security, said only two weeks ago: "The citizens of Tripoli are frightened.

We demand an end to the uncontrolled arms that have started to be clearly seen on the streets." Mr Belhaj himself is involved in a huge area of yet further disagreement: he has attacked attempts by "secular elements" to "isolate and ignore" Libya's Islamists. "Some call for us to be marginalised. We will not allow this," he warns, a little ominously.

The other bad augury from the death of the dictator is that it reminds us the new, free Libya has not entirely thrown off the old Gaddafi nastiness. Much of Sirte, a pro-Gaddafi city of 100,000 people, has been substantially destroyed by revolutionary forces: barely a building in many areas is undamaged.

"The rebels shelled my house," said Mohammed Ferjani, from District 3, a clearly civilian residential area, pointing at a huge hole in the side of it. "On our street, a whole family was killed."

District 3 was relatively lightly attacked. In Districts 1 and 2, their torn-down Gaddafi flags lying in rags on the ground, we drove through a townscape of almost complete destruction, empty of civilians.

Parts of the "Dollar" area - Libyan slang for the posh part of town - looked, quite simply, post-nuclear. By the end, Gaddafi and his entourage must have been some of the last people left in Sirte.

Libya's last retail copies of the Green Book, Gaddafi's incomprehensible tract, were strewn in the road outside the only shop in the country still stocking it. Sewage flooded the streets.

Outside the ruins of his home, a huge bomb crater obliterating most of the road, Ali Mohammed Ali, a mechanic, brewed tea. "Nato said they were protecting civilians, but I'm a civilian and they hit my house," he said. Alone in his area, Mr Ali stayed to protect his property from mass looting.

"There are two kinds of rebels," he said. "The first kind came to fight and the second kind to steal." It is no surprise that Libya cannot throw off viciousness.

Its history of repression goes back far further than Gaddafi.

Along this same road was the Italian concentration camp of Al Aghela, where thousands of Bedouin perished in colonial times, and Soulouk, where the great liberation fighter, Omar al-Mukhtar, was hanged by the Italians before 20,000 of his imprisoned supporters.

But this time, perhaps, Libya has a real chance to escape its history.

Unlike Egypt or Tunisia, where the leader went but the system stayed, Gaddafi's great bequest is that he was the system. Gaddafi's end leaves Libya with a cleaner sheet than any other Arab country. Even the militias are mostly composed of non-professional "citizen soldiers:" they may not want to abandon their families again for internecine fighting.

Along the road to Sirte, the old front line in Brega and Ras Lanuf, household names earlier this year, is now invisible.

This is the centre of Libya's oil industry, whose production is already back up from almost zero to 350,000 barrels a day, expects to reach a million by January and should return to full pre-war levels (1.6 million barrels) during 2012. The politics of free Libya may be difficult, but the economics are much more promising.

At Gaddafi's Tripoli compound of Bab al-Aziziyah, they have started knocking down the huge perimeter walls that kept out the public. And the lawn in front of his house, where he gave his famous speech promising to crush the then-rebel "rats," is now used for a weekly pet market.

On Sunday, in Tunisia, are held the Arab Spring's first free elections.

Next month it is Egypt's turn. And the day after Gaddafi died, President Obama announced the final pullout of the last American troops from Iraq.

Choreographed that may have been, but the sense of an old era ending and a new one beginning is real and unmistakable.