On Aug. 28, 2011, Libyan dictator Moammar Gaddafi and two of his sons fled the capital city of Tripoli, which after months of bitter fighting was finally succumbing to rebel advances. One of his sons, Khamis, was killed within a day, possibly by a NATO airstrike. Another, Saif al-Islam, made it to the town of Bani Walid, but in November fell into rebel hands. Moammar Gaddafi, who had ruled Libya for more than four decades, set out east for Sirte, his home town. He had less than two months to live.

Gaddafi's final days are detailed in a new report from Human Rights Watch, which painstakingly reconstructs his movements -- and those of the citizen militia that captured and executed him -- over his final weeks. At many points, the story rests on the account of loyalist fighters who were with him and sometimes on the recollection of a single associate whose information is difficult or impossible to verify, but it is so far the most complete account we have of the final days of the "mad dog of the Middle East."

Gaddafi arrived in Sirte, a town of about 75,000 on the Mediterranean coast, accompanied by a personal driver, a small contingent of bodyguards and a state security official named Mansour Dhao. He moved into the apartment blocks in the small downtown area. There, he received two of his regime's most notorious officials to discuss the ongoing civil war, which he was losing badly. The first, intelligence chief Abdullah Senussi, initially traveled with Gaddafi but later left to inform his wife that their son had been killed in fighting, which may have saved his life. The second, infamously cruel Gaddafi son Mutassim, was nominally commanding Sirte's defenses and visited his father regularly.

As the rebels' shelling of Sirte increased and as fighting moved into the city center, Gaddafi decided to move to a more sparsely populated neighborhood at the western edge of town. Bunkered down and wary of exposing themselves, Gaddafi and his bodyguards moved between abandoned homes, struggling to find a reliable source of food. The long-time dictator, who had siphoned off billions of dollars of oil wealth for his personal use, and his guards scrounged through the cupboards of empty houses for pasta and rice. Many of the water tanks had been damaged in fighting, making drinking water difficult to find.

For weeks, Gaddafi "spent most of his time reading the Koran and praying," Dhao, the security official, later told Human Rights Watch. "There was no communication, no television, nothing." They had a satellite phone they would use to call people who had access to a television and would narrate the news to them. "We had no duties, we were just between sleeping and being awake," Dhao recalled. "Nothing to do." They moved every four or five days, fearing their location would be discovered. Either to avoid raising suspicion or because it was all they had, they used only one or two cars when moving, ferrying Gaddafi and his contingent over multiple trips.

As their hiding wore on, Dhao said, Gaddafi "changed," "becoming more and more angry. Mostly he was angry about the lack of electricity,  communications and television, his inability to communicate to the  outside world. We would go see him and sit with him for an hour or so to  speak with him, and he would ask, “Why is there no electricity? Why is  there no water?”

The neighborhood turned into a sort of loyalist enclave, guarded by militias who also took over a local hospital and turned it into a sort of field clinic for wounded fighters from the area. The concentrating loyalist fighters drew more fire from the rebels, who sent artillery shells and Grad missiles into the neighborhood.

On Oct. 19, an increasingly worried Mutassim Gaddafi brought a plan to his father: they would flee Sirte, breaking through the line of rebels laying siege to the city. The old man agreed. Late that night, Gaddafi's small bodyguard corps began loading the neighborhood's few remaining residents and the clinic's wounded into a convoy of about 50 vehicles, mostly four-by-four pickups. The trucks were loaded up with weapons, some with machine guns or anti-aircraft guns mounted on the back.

Mutassim Gaddafi planned to push out at 3:30 or 4 a.m. But organizing the convoy took longer than he'd anticipated. There weren't ready until 8 a.m., by which time many rebel militias had returned to their positions and the flat desert plain was brightly lit. It's not clear why Mutassim Gaddafi and his father went ahead with their plan, as the conditions could not have been worse. Maybe they believed they could not wait until the following evening, maybe they didn't want to lose their momentum, or maybe they were just desperate. They pushed out to the west, through abandoned neighborhoods along the coast.

Rebels came onto the lumbering convoy almost immediately, bogging it down in the small neighborhood streets. The trucks came to an open road and turned south; it's not clear if this was always the plan, or if they diverted to avoid the rebels. Almost immediately, a missile landed next to Gaddafi's car. The blast was so powerful that the car's airbags inflated, according to Dhao, who also took shrapnel from the explosion.

Apparently panicked, the convey turned west again, back into the neighborhoods streets. Before long, they ran directly into an ad hoc base of rebel militias. The rebels were from Misurata, a city that Gaddafi's forces had besieged for weeks, lobbing cluster bombs into densely populated neighborhoods, turning it into what more than one resident called "a hell." The convoy attacked the rebels head on, another tactical mistake as they quickly became pinned down. NATO fighter jets dropped two "PAVEWAY" laser-guided bombs, each 500 pounds, raining the convoy with shrapnel and setting off a series of explosions as the munitions-loaded trucks caught fire.

Gaddafi, his son Mutassim, his defense minister, and a personal bodyguard contingent climbed off the road into an abandoned home, where rebels followed them. "We found Moammar there, wearing a helmet and a bullet-proof vest. He had a handgun in his pocket and was carrying an automatic weapon," recalled the defense minister's son, who scrambled to protect the leader. Mutassim Gaddafi led a contingent of about 10 fighters to try to reopen the road, telling his father, "I will try to find a way out of here." He was quickly captured and, within hours, executed.

"Then the villa started being shelled so we ran out of there," the defense minister's son remembered. "There were a lot of cement construction blocks outside and we hid among those, with the families and the guards." Gaddafi and about 10 others sprinted across an open field to a drainage pipe that ran under the road. They hunched down and crawled through it, but rebels spotted them "almost immediately" when they emerged, witnesses told Human Rights Watch.

In the battle that followed, one of Gaddafi's bodyguards attempted to throw several grenades at the rebels, one of which bounced off a concrete wall and landed near Gaddafi. The bodyguard leaned over to retrieve the grenade when it exploded, taking off his arm and wounding both Gaddafi and the defense minister. "I ran towards my father, but he didn’t answer when I asked him if he was okay," the minister's son said. "I saw Moammar bleeding," apparently from a head wound. The bodyguard contingent collapsed.

The rebels quickly descended from the road, where many later said they were shocked to find the dazed Gaddafi. The rebel contingent quickly turned into a mob, surrounding and beating their former dictator, pulling his hair. One stabbed Gaddafi in the anus with a bayonet. "It was a violent scene, he was put on the front of a pickup truck that tried to drive him away, and he fell off," a rebel commander told Human Rights Watch. "We understood that there needed to be a trial, but we couldn't control everyone, some acted beyond our control."

What happened next is not clear. A phone video of the scene appeared to show, according to Human Rights Watch, "Gaddafi's nearly naked and apparently lifeless body being loaded into an ambulance, suggesting that he may have been dead by the time he left his area of capture." Two hours later, the ambulance arrived in Misurata, and photos of Gaddafi's corpse began circulating around the globe.

The world may never know who killed Moammar Gaddafi. It's possible that any one of his injuries, including the grenade explosion, may have killed him, or that the 69-year-old succumbed during the mob beating. It's possible he was executed before being loaded into the ambulance or sometime after, before reaching Misurata. "Some militia fighters from Benghazi claim to have shot Gaddafi dead during a dispute with Misurata fighters about where to take him, but their claims remain unconfirmed," the Human Rights Watch report says.

The transitional government, wanting as little attention as possible for Gaddafi's resting place, buried him in secret somewhere in the Libyan desert. The grave, which he shares with his defense minister and his son Mutassim, is unmarked.