However, due to an intense NATO bombing campaign of loyalist forces, pro-Gaddafi troops had to pull back from the mountains.
The offensive started on 13 August 2011 with rebels advancing toward the oil refinery town of Zawiya supported by NATO air-strikes.
[12] One group of rebels fought through loyalist defensive lines in the western sector of the town, overrunning it,[13] and pushed into the city center.
After the rebels reached the main square loyalist forces from the eastern part of Zawiya counter-attacked with a barrage of heavy weapons.
Later during the day, Al Jazeera English stated that the rebels had taken control of a key highway running through Zawiya, the one that links Tunisia to Tripoli.
[20] The same day rebels claimed that they captured the neighboring city of Sorman, just west of Zawiya, and that they suffered ten dead and 34 wounded in fighting there.
[25] Al Jazeera reported the fall of Sabratha to rebel forces, with the exception of an army base west of the city, which had been besieged.
[40] On 27 August, a ship carrying ammunition for the Libyan rebels fighting for control of the coastal road, west of Tripoli to the Tunisian border, blew up on Saturday at the port of Zuwara.
[41] On 28 August, an Al Jazeera English correspondent reported that a region near Ajaylat was controlled by a "small pocket" of pro-Gaddafi forces, but that supply lines safely bypassed the town.
[46][47] The rebels captured a military barracks, which housed the elite Khamis Brigade, 27 kilometres (17 miles) west of Tripoli, as well as weapons and ammo left behind by retreating loyalists.
[58][59] On 15 August, apparently in response to rebel battlefield successes, a Scud missile was fired from the Gaddafi stronghold of Sirte at rebel-controlled territory.
It is believed that the missile was intended to hit rebel troop formations around Brega; instead, it overshot the target by 80.5 kilometres (50.0 mi) and landed harmlessly in the desert.
[62][63] On 19 August, rebels stated that Abdel Sallam Jalloud, who was once Gaddafi's closest adviser, had defected to them, displaying pictures of him in the rebel-held city of Zintan as proof.