SIRTE, Libya — Moammar Gadhafi, who ruled Libya with a dictatorial grip for 42 years until he was ousted by rebels in a bloody civil war, was killed Thursday when revolutionary forces overwhelmed his hometown, Sirte, the last major bastion of resistance two months after the regime fell.

Prime Minister Mahmoud Jibril confirmed Gadhafi had been killed. “We have been waiting for this moment for a long time. Moammar Gadhafi has been killed,” Jibril told a news conference in the capital Tripoli.

Initial reports from fighters said Gadhafi had been holed up with the last of his fighters in the furious battle with revolutionary fighters assaulting the last few buildings they held in his Mediterranean coastal hometown of Sirte. At one point, a convoy tried to flee the area and was blasted by NATO airstrikes, though it was not clear if Gadhafi was in the vehicle.

Al-Jazeera TV showed footage of a man resembling the 69-year-old Gadhafi lying dead or severely wounded, bleeding from the head and stripped to the waist as fighters rolled him over on the pavement. Witnesses said his body was put on display in the nearby city of Misrata.

Celebratory gunfire and cries of “Allahu Akbar” or “God is Great” rang out across the capital Tripoli as the reports spread. Cars honked their horns and people hugged each other. In Sirte, the ecstatic former rebels celebrated the city’s fall after weeks of bloody siege by firing endless rounds into the sky, pumping their guns, knives and even a meat cleaver in the air and singing the national anthem.

Libya’s new leaders had said they would declare the country’s “liberation” after the fall of Sirte. The death or capture of Gadhafi adds greater solidity to that declaration.

It rules out a scenario that some had feared — that he might flee deeper into Libya’s southern deserts and lead a resistance campaign against Libya’s rulers. The fate of two of his sons, Seif al-Islam and Muatassim, as well as some top figures of his regime remains unknown, but their ability to rally loyalists would be deeply undermined with Gadhafi’s loss.

Information Minister Mahmoud Shammam said he was told that Gadhafi was dead from fighters who said they saw the body.

“Our people in Sirte saw the body,” Shammam told The Associated Press. “Revolutionaries say Gadhafi was in a convoy and that they attacked the convoy.” He said the government head, Mustafa Abdul-Jalil, would officially confirm the death, but it was not clear when. Prime Minister Mahmoud Jibril, the number two in the administration, called a press conference for 4 p.m. local time (10 a.m EDT)

Sirte’s fall caps weeks of heavy, street-by-street fighting as revolutionary fighters besieged the Mediterranean coastal city. Despite the fall of Tripoli on Aug. 21, Gadhafi loyalists mounted fierce resistance in several areas, including Sirte, preventing Libya’s new leaders from declaring full victory in the eight-month civil war. Earlier this week, revolutionary fighters gained control of one stronghold, Bani Walid.

By Tuesday, fighters said they had squeezed Gadhafi’s forces in Sirte into a residential area of about 700 square yards but were still coming under heavy fire from surrounding buildings.

In an illustration of how heavy the fighting has been, it took the anti-Gadhafi fighters two days to capture a single residential building.

Reporters at the scene watched as the final assault began around 8 a.m. Thursday and ended about 90 minutes later. Just before the battle, about five carloads of Gadhafi loyalists tried to flee the enclave down the coastal highway that leads out of the city. But they were met by gunfire from the revolutionaries, who killed at least 20 of them.

Col. Roland Lavoie, spokesman for NATO’s operational headquarters in Naples, Italy, said the alliance’s aircraft Thursday morning struck two vehicles of pro-Gadhafi forces “which were part of a larger group manoeuvring in the vicinity of Sirte.”

But NATO officials, speaking on condition of anonymity in accordance to alliance rules, said the alliance also could not independently confirm whether Gadhafi was killed or captured.

The Misrata Military Council, one of the command groups, said its fighters captured Gadhafi.

Another commander, Abdel-Basit Haroun, said Gadhafi was killed when the airstrike hit the fleeing convoy.

One fighter who said he was at the battle told AP Television News that the final fight took place at an opulent compound for visiting dignitaries built by Gadhafi’s regime. Adel Busamir said the convoy tried to break out but after being hit it turned back and re-entered the compound. Several hundred fighters assaulted.

“We found him there,” Busamir said. “We saw them beating him (Gadhafi) and someone shot him with a 9mm pistol ... then they took him away.”

In a sign of the conflicting versions, military spokesman Col. Ahmed Bani in Tripoli told Al-Jazeera TV, “I can assure everyone in Libya that Gadhafi has been killed for sure and I’m definitely sure and I reassure everyone that this story has ended and this book has closed.”

But rather than a strike on the convoy, he said a wounded Gadhafi “tried to resist (revolutionary forces) so they took him down.”

Adel Busamir — we found him there.. maybe in the VIP palace. We found 5 bodies in a square and we walked ahead and we saw them beating him (Gadhafi) and someone shot him with a 9mm ... then they took him away

After the battle, revolutionaries began searching homes and buildings looking for any hiding Gadhafi fighters. At least 16 were captured, along with cases of ammunition and trucks loaded with weapons. Reporters saw revolutionaries beating captured Gadhafi men in the back of trucks and officers intervening to stop them.

In the central quarter where Thursday’s final battle took place, the fighters looking like the same ragtag force that started the uprising eight months ago jumped up and down with joy and flashed V-for-victory signs. Some burned the green Gadhafi flag, then stepped on it with their boots.

They chanted “Allah akbar,” or “God is great” in Arabic, while one fighter climbed a traffic light pole to unfurl the revolution’s flag, which he first kissed. Discarded military uniforms of Gadhafi’s fighters littered the streets. One revolutionary fighter waved a silver trophy in the air while another held up a box of firecrackers, then set them off.

“Our forces control the last neighbourhood in Sirte,” Hassan Draoua, a member of Libya’s interim National Transitional Council, told The Associated Press in Tripoli. “The city has been liberated.”

The spokesman for Libya’s transitional government, Jalal al-Gallal, and another military spokesman Abdul-Rahman Busin said the reports have not been confirmed.

The caution in making a definitive announcement came because past reports of Gadhafi family deaths or captures have later proven incorrect, even after they were announced by officials, because of the confusion among the revolutionary forces’ ranks and the multiple bodies involved in commanding their fighters.

Gadhafi loyalists who have escaped could still continue the fight and attempt to organize an insurgency using the vast amount of weapons Gadhafi was believed to have stored in hideouts in the remote southern desert.

Unlike Iraq’s Saddam Hussein, Gadhafi had no well-organized political party that could form the basis of an insurgent leadership. However, regional and ethnic differences have already appeared among the ranks of the revolutionaries, possibly laying the foundation for civil strife.

Gadhafi has issued several audio recordings trying to rally supporters. Libyan officials have said they believe he’s hiding somewhere in the vast southwestern desert near the borders with Niger and Algeria.