Moammar Gadhafi, the eccentric Libyan leader who made his oil-rich nation a pariah state that practised terrorism abroad and brutality at home, was killed as rebel fighters battered their way into his last embattled refuge.
The exact circumstances of Col. Gadhafi's death were unclear, but the interim Libyan prime minister, Mahmoud Jibril, voicing the sense of relief that washed over the country, declared that "the evil people" had been eliminated from Libyan soil.
Col. Gadhafi, 69, was shot in the besieged city of Sirte, his hometown, and it appears that he died at the scene or soon afterward. One account had him being discovered cowering in a hole. Another had him set upon by rebels who attacked his convoy as it threaded its way out of the city and stopped short under fire from NATO warplanes.
Whatever details of Col. Gadhafi's final moments finally emerge – if they emerge – his death closes a chapter while opening an uncertain future for Libya as it struggles to restart its economy and move beyond vengeance.
The fall of Sirte, rebel leaders said, was reason enough to declare the final victory in the bloody revolution that began in February and ultimately ended the 42-year reign of Col. Gadhafi and his pampered family clique. More importantly, though, it may clear the way for Libyans to start to exorcise the trauma of his reign.
"I just don't think the Libyans themselves would have been able to turn the page until they were confident that he was killed and killed publicly," said Lisa Anderson, a Libya expert and president of the American University of Cairo. "From the point of view of how personally damaging to every Libyan family the Gadhafi regime had been, there was never going to be any mercy."
The first rumours of his death or capture set off a paroxysm of celebratory gunfire in the streets of the Libyan capital. Ships in the harbour tooted their horns, as they had when rebels moving in from the east took Tripoli in late August.
The age of instant information produced the inevitable images of what appeared to be Col. Gadhafi's seizure by rebel fighters: jerky images, taken with mobile phones, showing a limp bloodied body surrounded by shouting fighters in mix-and-match uniforms.
The corpse was taken to Misrata, west of Sirte, and the home base for the militias that led the last assault. It was being stored at a depot 12 kilometres of the city, according to Hisham Imbirika, the director of a prison there.
Islamic tradition requires burial of the dead within 24 hours, although the body was not likely to be placed in a marked grave where it could become a magnet for either aggrieved or sympathetic Libyans.
"He doesn't deserve a grave in Libya," said Mohamed Benrasali, an official with the governing National Transitional Council. "Maybe someplace in the ocean, with Osama bin Laden."
The National Transitional Council issued a sober statement that cast the event as punishment earned and justice done.
"It is an historic moment," said Abdel Hafez Ghoga, an NTC spokesman. "It is the end of tyranny and dictatorship. Gadhafi has met his fate."
NTC officials in Tripoli said that one son, Muatassim Gadhafi, was killed in the Sirte battle with his father. But they could not confirm whether Saif al-Islam, the more urbane son once touted as his father's successor, had been killed or captured in the fighting.
The fast-paced drama of the death of a dictator capped an eight-month struggle by largely untrained and poorly equipped rebels that started in the eastern city of Benghazi in February.
Col. Gadhafi responded with ferocity, bombing civilian neighbourhoods with abandon. Within a few weeks, France, Britain, the United States and Canada started bombing Col. Gadhafi's forces to protect Libyan civilians. Backed by a UN Security Council resolution, NATO took command of the mission in late March.
Billed as the enforcement of a no-fly zone, the campaign gave the rebels a de facto air force. For NATO it was a low-profile role that set a new standard: an air war that worked and a Western intervention in an Arab country that did not alienate the Arab public.
The Libyans now face the task of building state institutions and a viable political system almost from scratch, in a country where the Gadhafi regime took every opportunity to exploit tribal, class and geographic divisions.
Within eight months, NTC officials are to name a national congress to draw up a draft constitution. It will be put to a vote by referendum, with elections to a new parliament to follow.
Until now, Libyans in liberated cities have been running their neighbourhoods on an ad-hoc basis, with self-help committees and temporary ministers appointed by NTC leaders. But their solidarity is fraying.
"Libya has the problem of personal vendettas, score-settling, people who think things of theirs were stolen by the regime, people who think they were damaged by people close to Gadhafi, tribal rivalries – just a cauldron of problems," Prof. Anderson said. "It's going to be overwhelming."
Resolving many of the immediate problems will take money, meaning an interim government will also have to restore global confidence in its ability to boost its oil production by clarifying rules for the country's state-owned oil company as well as the international firms that were operating there.
Libya is now estimated to be producing about 200,000 barrels a day. Analysts expect it to reach 600,000 barrels a day by the end of the year, but that is still far below the pre-war level of 1.6-million barrels a day.
"If this leads to greater political clarity within Libya, and to a more stable operating and investment environment, then it may result in a more rapid restoration of the Libyan oil sector," said David Fyfe, head of the oil industry and markets division at the Paris-based International Energy Agency, which advises industrialized countries on energy issues.
Col. Gadhafi seized power as the leader of a group of army officers who overthrew the Italian-supported monarchy of King Idris in 1969. He was 27 and, for many Libyans, a dashing emblem of Arab strength in mould of his hero, the Egyptian leader Gamal Abdul Nasser.
Over the years, his meddling in his neighbours' affairs robbed Libya of friends and his cronyism drained its people of the benefits of their oil wealth. In the 1990s, charges of bombing European airliners and a German nightclub put Libya on the American list of state sponsors of terrorism.
In the past decade, Col. Gadhafi tried to come in from the cold. He allowed American and British intelligence agencies to deliver terror suspects to his prisons for interrogation. He won a measure of tolerance in Western capitals, at least until he set out to bomb his own people, "rats" as he called them, when they rose up in revolt earlier this year.
His death presents an opportunity to heal the wounds.
"We need some sort of reconciliation," said Salah Marghani, a Libyan-Canadian human-rights lawyer in Tripoli. "Even if there [are]any people loyal to Gadhafi, he is now dead and the best thing is that they just join the rest and work for a better Libya."
With reports from Graeme Smith, Paul Koring and Shawn McCarthy