Rebels fighting east of Tripoli strengthened their grip on the town of Tuarga on Saturday, winning key battles against Muammar Gaddafi's forces and creating a buffer zone for the city of Misrata.
On day three of a major offensive, rebels from the port enclave of Misrata said they routed all but a few pockets of loyalist forces, some of whom were now in hiding.
For much of the day the rebels had been closing in on Gaddafi's remaining sniper and artillery positions in the east of the town, after establishing control over the north, centre and south on Friday.
Shortly before midnight military spokesman Ali Gliwan told AFP rebels now controlled all of Tuarga from the main road in the west to the eastern gate of the town.
That claim could not be fully verified, but late on Saturday an AFP reporter witnessed little evidence of continued heavy fighting seen the day before.
Instead streams of jubilant rebel fighters were seen travelling back toward Misrata, some with pickup trucks full of goods.
But the fighters also reported they were still coming under attack from Gaddafi artillery that had retreated to towns and villages beyond Tuarga.
Taking full control of the town would be a major victory for the rebels, pushing Gaddafi's forces away from the besieged city of Misrata and cutting one supply line between Tripoli and Gaddafi's home town of Sirte. It could also provide a major morale boost for the rebels.
Tuarga and Misrata have been on opposite sides of Libya's civil war since the early days of the revolt. After months of bombardment, the citizens of Misrata blame Tuarga's residents for many of the attacks on their hometown.
But the battle has taken its toll. According to official rebel figures nine fighters have died and 74 have been wounded since the attack began on Thursday.
Rebels estimated at least 200 loyalist soldiers were killed and confirmed 52 more were captured. The bodies of at least four Gaddafi loyalists were seen at a field hospital near the town's northern entrance.