A Gadhafi nephew read a prayer for the dead before Gadhafi's body - along with those of his son Muatassim and former defense minister Abu Bakr Younis - were handed over for burial, said Ibrahim Beitalmal, a spokesman for the military council in the port city of Misrata.
The bodies had been kept in cold storage in Misrata for four days before being taken under cover of darkness to the burial site, which Beitalmal said was "not far" from the city. As part of the ceremony, the bodies were washed in line with Islamic tradition. A Muslim cleric, a nephew of Gadhafi and sons of Abu Bakr then recited prayers before handing the bodies over for burial, which took place at 5 a.m.
Libya's new leaders have said they would not reveal the location of the grave, fearing it could be vandalized or turned into a shrine for the former dictator's die-hard supporters.
Gadhafi was captured alive on Thursday as he tried to flee his hometown of Sirte, where he had been hiding since revolutionary forces swept into the capital, Tripoli, two months earlier.
He died later that day in unclear circumstances, and Libyan leaders have promised an investigation in response to international pressure to look into Gadhafi's death. Video has emerged showing Gadhafi being beaten and abused by a mob after his capture, and researchers for the New York-based Human Rights Watch have said there are strong indications he was killed in custody.
Human rights activists have warned that the new Libya could get off on the wrong foot if vigilante justice is condoned. However, many Libyans appeared relieved that Gadhafi is dead, saying a long trial for the former dictator would have been disruptive and made it harder on the country to get a fresh start. Earlier this week, interim leader Mustafa Abdul-Jalil formally declared an end to the civil war, starting the clock on what is to be a two-year transition to democracy.
The bodies of Gadhafi, Muatassim and Younis had been kept in a refrigerated produce locker in a warehouse area of Misrata for the past four days. Hundreds lined up every day to view the corpses, some coming from hundreds of miles away. Visitors donned surgical masks, and at times guards arranged separate lines for men and women.
Misrata suffered immensely during the war. It was besieged for nearly two month this spring by Gadhafi forces, who shelled the city indiscriminately before being pushed out in fierce street fighting. Gadhafi was captured by fighters from Misrata, who brought him back to the city as a trophy.
International organizations asking to see the burial site would be given access, Beitalmal said.
Over the weekend, Libya's chief pathologist, Dr. Othman el-Zentani, performed autopsies on the three bodies and also took DNA samples to confirm their identities. El-Zentani has said Gadhafi died from a shot to the head, and said the full report would be released later this week, after he presents his findings to the attorney general.
Gadhafi and Muatassim had been wounded before capture, but an investigation is to determine whether they were subsequently executed. Government officials have suggested Gadhafi was killed in crossfire.
Tirana Hassan, a researcher for Human Rights Watch, said she spoke Monday to a 30-year-old Sirte resident who had traveled in the convoy that tried to smuggle Gadhafi out of Sirte.
Hassan quoted the woman as saying that Gadhafi did not sustain serious injuries during the NATO strike on the convoy.
The woman said the former Libyan leader and members of his entourage left their vehicle after the attack and took cover for about three hours in an abandoned building. Gadhafi then left the hideout with a small group on foot, and they were captured a short while later, Hassan quoted the woman as saying.
The woman, who had volunteered at a field clinic in Sirte treating wounded Gadhafi loyalists, was released by the revolutionary forces and has returned to Sirte, Hassan said.
The Libyan uprising that began in mid-February and quickly turned into civil war has decimated the Gadhafi family.
His wife, Safiya, fled to Algeria with their daughter and one son, while another son fled to Niger. At least other three sons - Muatassim, Seif al-Arab and Khamis - have been killed. Another son, former heir apparent Seif al-Islam, remains at large.
A high-ranking Tuareg official in Niger said Tuesday that Seif al-Islam, who is wanted by the International Criminal Court, is headed for Niger with the help of ethnic Tuaregs, a tribe that was among Gadhafi's strongest supporters.
Also Tuesday, Bani, a revolutionary spokesman, said an explosion rocked a fuel depot near Sirte a day earlier and that there were casualties. Bani said the blast is being treated as an accident, but that an investigation has been opened.
Hassan, the Human Rights Watch researcher, said that while in Sirte on Monday, said she saw 11 people with severe burns arrive at the city's Ibn Sina hospital. Nurses said the injuries were from the blast.
Associated Press writer Maggie Michael contributed to this report from Cairo.