Second Battle of Zawiya
The Second Battle of Zawiya or Zawia was a battle in the Libyan Civil War between rebel anti-Gaddafi forces and forces loyal to Muammar Gaddafi for control of the Tripolitanian city of Zawia. Background 

Zawiya rose against Gaddafi on 24 February, and formed an important strategic obstacle to loyalists. Strong loyalist efforts were made to recover the city, and after withstanding two to three weeks of assault by two mechanized brigades (the Khamis and Hosban), the city fell on 10 March. This victory allowed loyalist forces to reconquer other rebel-held cities on the western Tripolitanian coast, including Zuwara. Rebel forces made an attempt to regain the city in mid-June, but this attempt was unsuccessful. Holding Zawiya was a priority for the pro-Gaddafi forces, as the city lies on their coastal supply route and is a vital control city on the route from Tripoli to Tunisia. It also is home to an important oil refinery, the only one in loyalist hands prior to the battle. The battle
The Associated Press reported that among the rebel forces advancing on the city, a leading contingent were rebels from Zawiya who had fled to the mountains. The bulk of the opposition force advanced to a bridge on the southwestern outskirts before being hit by loyalist artillery fire. One group of rebels got through loyalist defensive lines in the western sector of the town, overrunning it, and pushed into the city center. At the same time, upon the entrance of the rebels into the streets of the city, they were cheered by some residents who came out of their homes to greet them, shouting "God is great". Some joined the rebels as fighters. A rebel spokesman asserted that the pro-Gaddafi forces' areas of control had been reduced to a couple of pockets, and that the rebels in the mountains could send supplies and reinforcements to Zawiya at any time since the road was open. After the rebels reached the main square, loyalist forces from the eastern part of Zawiya counter-attacked with a barrage of heavy weapons. NATO conducted airstrikes in support of rebel forces. One strike hit a rebel tank in a friendly fire incident, killing four. By the evening, the Libyan government stated that a rebel force entered the city on a suicide mission but failed to take control of the town and that Zawiya was totally under government control. A rebel commander stated that opposition forces were almost a kilometer south of the city center, on the western side of the main road, while loyalist troops were on the east side. A Reuters reporter stated that gunfire could be heard on the outskirts of the city. Reports were contradictory regarding the situation in the city. A Reuters reporter stated that the rebels held the city center with no signs of ongoing heavy fighting, though occasional gunfire could be heard. An Al Jazeera reporter stated that there was still ongoing fighting within the city, and the city center had not yet been taken. Opposition forces claimed to control 70 percent of Zawiya, but loyalist snipers and sleeper cells remained in the city, and the rebels had not yet been able to clear them. The bulk of the pro-Gaddafi forces were reported to have retreated east towards Tripoli, though it was not immediately clear whether or not this was a strategic withdrawal. Rebels also feared a potential loyalist counteroffensive in the near future. Rebel forces captured several abandoned weapons, including ammunition, anti aircraft guns and anti tank artillery. On 14 August, in the afternoon, an Al Jazeera reporter said that fighting was still ongoing and that the rebels had not taken the center of the city. A rebel commander told the AFP that they controlled the western and southern gate of Zawiya while government forces were controlling the east and the center of the town. He stated that they managed to push 3 km inside the city but were suffering high casualties due to fire from snipers, without giving a number. At 16:15, an Al Jazeera field reporter said that the rebels had taken control of a key highway running through Zawiya, the one that links Tunisia to Tripoli. Ongoing fighting was occurring in the southern Surnam district where loyalist forces had been shelling rebels with artillery from inside the city. A NATO spokesman said: "Nothing is certain yet and there is no confirmation about who has control of Zawiya because the situation changes every day." On 15 August, loyalist forces pushed back the rebels from the city center in a concentrated effort to block the rebel advance. 15 people were killed in an artillery strike, including a woman and a child. By the evening, the rebels claimed to hold 80 percent of Zawiya. They arrested 15 people they said were African mercenaries and Libyan Army soldiers, though at least one alleged mercenary claimed he was an innocent Nigerian guest worker. Some fighters said they expected it would take some time to clear all the snipers from tall buildings inside the city. Some shelling continued, though rebel soldiers said fighting was getting closer to the loyalist-held oil facility. A rebel fighter CNN described as "a source who has proven reliable in the past" said Gaddafi-loyal forces in Janzour, a Tripoli suburb just east of Zawiya, were pelting the city with Grad rockets, killing two, but NATO airstrikes had hit artillery positions in Janzour and the barrage had slowed. On 16 August, a NATO spokesman said that rebels held the city center, but there were "reports of fighting also in the suburbs". Al Jazeera stated that the city center in Zawiya had been captured the day before. Loyalists were also still holding the refinery. Doctors who had escaped a hospital in eastern Zawiya held by Gaddafi's forces said their hospital was being used for military purposes, with snipers positioned on the roof and anti-aircraft artillery set up just outside the entrance. They said doctors and nurses had been held hostage and forced to operate continuously on wounded loyalist soldiers since the start of the battle. On 17 August, rebel forces attempted to take control of the oil refinery from Gaddafi forces. They claimed to have shut down all oil pipelines to the capital. During the battle for the refinery complex, at least 100 Gaddafi loyalists, mostly Chadian mercenaries according to the rebels, were left defending the refinery after refusing to surrender despite being besieged. At least 200 rebel fighters were involved in the assault on the oil refinery. The rebels managed to capture the refinery's entrance gate area, but were unable to take the refinery thus far due to intense sniper fire from loyalist forces within the refinery. Al Jazeera had also confirmed from a rebel commander that the city center was still under loyalist control, refuting earlier NATO claims that the opposition had taken the center. The main loyalist sniper base was in the hotel at the main square. The oil refinery, according to rebels, fell into their hands sometime in the night, although small pockets of resistance from snipers remained inside the complex. On 18 August, a Reuters reporter on the scene, as well as the BBC and Sky News confirmed that the refinery had been taken. It was announced that the Zawiya refinery would begin production again within days, this time for rebel forces. The rebel soldiers also gave their account of the refinery battle, saying that after performing a five-hour rear guard action, 100-150 loyalist soldiers had retreated via the sea using boats, at least one of which was targeted by a NATO warplane and subsequently sunk. NATO described the boat's actions as "repositioning" and "progressing towards another location [where] we believe they were going [sic] to make attacks on "civilians"." On 19 August, rebel forces were able to take Martyrs' Square in central Zawiya, also capturing the hospital where a number of loyalist troops were based. However, pro-Gaddafi forces soon launched an intense counterattack with rockets, mortars and anti-aircraft guns. By 20 August, rebels had taken full control of the city including the eastern parts, which was confirmed by journalists who were taken to former loyalists positions. Journalists said that fighting was still ongoing to the east of the city though and loyalist shelling of Zawiya continued. Al Jazeera stated that fighting was still ongoing at the 27 km Bridge east of the city (the 27 km bridge is named as such because it is exactly 27 km from Tripoli). NATO strikes
According to NATO's daily Operational Media Updates, the NATO strikes, during the offensive, hit:

References

Zawiya
Zawiya, Libya
August 2011 events in Africa