In the Libyan censuses of 1973 and 1984, the city counted about 91,603 inhabitants; it was then – and possibly continues to be today – the fifth city-largest city in Libya by population (after Tripoli, Benghazi, Misrata and Bayda). In 2011, Zawia was estimated to have a population of about 200,000 people, most of whom were concentrated in the city. Zawia has a university named the University of Zawia, founded in 1988. There is also an oil field near the city and Zawia has one of the two most important oil refineries in Libya. Zawia was the site of some of the fiercest fighting in the Libyan civil war, as it controls the vital route between the national capital Tripoli and the Tunisian border.
During the Libyan civil war, severe fighting between the Libyan opposition and the government of Muammar Gaddafi has taken place in and around the city. In a phone call specifically aimed at its residents, Gaddafi said the protesters were young people that had been duped into "destruction and sabotage" with drugs and alcohol. On 8 March 2011 it was reported that Gaddafi forces had 'torn the town to ashes', having used air power, and 50 tanks, to destroy the town. According to one witness, "the city is in ruins...everyone on the street is shot on sight." According to another report regime violence began to escalate on the morning of the 6 March 2011 and intensified in the following days – " Children have been shot while sitting in front of their houses, the hospital has been bombarded. I don't know where the injured are going to go."
On 10 March, the city was retaken by pro-Gaddafi forces.
On 18 March, it was reported that protests had once again appeared in the city. By early April 2011, the uprising having been brutally quashed, the city was " back under Gaddafi's thumb after daring to rise up in his very own backyard." The main mosque that overlooked Martyrs' Square where the injured and dying were treated when Gaddafi's tanks and snipers moved in, had been "completely destroyed, not a trace left." Thousands of Zawians had been taken away for questioning in the last few weeks, according to rebel sources. Un-confirmed reports stated that as many as 10 anti-Gaddafi fighters were buried in the town center. After the battle, no trace of the graves or bodies was seen.
Since Gaddafi's troops took control of Zawia the revolutionaries have been using guerrilla action against Gaddafi's soldiers. On various occasions rebels have ambushed Gaddafi's men but had to use night cover to prevent detection.
On 11 June, around one hundred rebels infiltrated the city and claimed that they won control of some sections, marking the first significant clashes between loyalist and opposition forces since it was recaptured by Gaddafi's troops in March. Due to the ongoing fighting, loyalist forces closed down a highway that crosses the town, a key expressway for Gaddafi's war effort. The next day, rebels were pushed out of the city by Gaddafi brigades and the road to the city reopened. As of 6 August, rebels had launched an offensive towards Zawia, and revolutionaries in the city allegedly said they would rise up in support of the rebels when they reached the city.
In early August, anti-Gaddafi forces launched an offensive into the plains surrounding Zawia reaching the outskirts of the city but not holding positions. On 13 August, amid conflicting reports about the outcome of the latest fighting, Al Jazeera Arabic announced that Gaddafi forces had abandoned Zawia, and anti-Gaddafi forces had moved in on the same day.
The multi-purpose stadium, Zawia Stadium, which is mainly used for football, is located in the city.