Fighters from Libya's ruling National Transitional Council(NTC) celebrated late into Monday night after capturing Bani Walid, one of the last holdouts of former leader Moamer Gaddafi's loyalist forces, dpa reported.
Fierce fighting, however, continued in the city of Sirte.
The elated fighters in Bani Walid flew the flag of the new Libyan government over mosques and other buildings inside the city, the Dubai-based broadcaster Al Arabiya reported.
Chanting "God is Great," the fighters fired celebratory machine gun rounds in the air to commemorate the apparent end of six-weeks of fierce fighting against Gaddafi?s loyalists.
Colonel Ahmad Bani, military spokesman for the NTC, told Al Arabiya, "We are now controlling 95 percent of Bani Walid ... still our fighters are combing (through the area) to make sure there are no pockets of resistance."
What seemed to be an end to the fighting in the city allowed the International Committee of the Red Cross (ICRC) to bring much-needed medical supplies to Bani Walid's hospitals.
Al Arabiya showed footage of decayed bodies inside one of the war-ravaged city's main hospitals.
The city's capture has boosted hopes among Libya's new leaders that they will soon control the North African country, nearly two months after rebels ended more than four decades of Gaddafi's rule.
Senior NTC commander Ayad Sayed al Russi told Al Arabiya that all civilians who fled Bani Walid in recent weeks can now safely return to their homes.
Meanwhile, fighting continued in Gaddafi's hometown Sirte.
"The fighting is concentrated now in a area that does not exceed one kilometer," Bani told Al Arabiya.
The broadcaster estimated that 10,000 people are still trapped in Sirte, mostly women and children.
A Libyan rebel commander told al Jazeera earlier that pro-Gaddafi fighters were using Sirte residents as "human shields."
Gaddafi used to have relatives living in Sirte and unconfirmed reports said some of his sons were hiding in the city.
On Monday a television channel loyal to the deposed Libyan leader confirmed the death of his youngest son Khamis.
Damascus-based Al Rai television said that Khamis Gaddafi was killed during fighting in Tarhouna, 80 kilometres south of the capital Tripoli, on August 29.
Khamis, 28, was a commander of a pro-Gaddafi brigade that was said to have been in charge of suppressing anti-government protests when they began in early February in the eastern city of Benghazi.
Meanwhile, British Foreign Secretary William Hague visited Tripoli Monday to reopen Britain?s embassy in the Libyan capital. Hague said the embassy had an "important role to play" in building relations with the newly-emerging democracy in Libya.
Britain suspended its embassy operations in Tripoli in February during the build-up to the NATO-led intervention a month later. It recognized the National Transitional Council as Libya's new government at the end of August when Gaddafi?s former diplomats were told to vacate the London embassy to make room for their successors.