Libyan fighters have overrun the last positions of Muammar Gaddafi loyalists holding out in his home town of Sirte, reports say.
Reporters on the scene say the final push to capture the remaining pro-Gaddafi positions was over after about 90 minutes.
Just before the assault, about five carloads of loyalists tried to flee the enclave down the coastal road but were killed by revolutionaries.
"Our forces control the last neighbourhood in Sirte," said Hassan Draoua, a member of Libya's interim National Transitional Council. "The city has been liberated."
After the battle, revolutionaries began searching homes and buildings looking for any Gaddafi fighters who may be hiding there. At least 16 pro-Gaddafi fighters were captured, with multiple cases of ammunition and trucks loaded with weapons.
Reporters saw revolutionaries beating captured Gaddafi men in the back of trucks and officers intervening to stop them.
Celebratory gunfire echoed through Sirte, which fell into the hands of revolutionaries almost two full months after they overrun Tripoli and many other parts of the country.
Despite the fall of Tripoli on August 21, Gaddafi 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, and by Tuesday said they had squeezed Gaddafi 's forces in Sirte into a residential area of about 700 square metres but were still coming under heavy fire from surrounding buildings.
Deputy defence minister Fawzi Abu Katif said on Wednesday that authorities still believe Gaddafi's son Muatassim is among the ex-regime figures holed up in the diminishing area in Sirte. He was not seen on the ground after the final battle.