The territory remaining under Gadhafi's control has been shrinking in the past three weeks, with rebel fighters advancing on the capital from the west, south and east.
Zawiya, a coastal city just 30 miles west of Tripoli, is the biggest prize so far in the rebels' three-week-old offensive.
The rebels also claimed to have captured two more towns - Zlitan in the west and Brega in the east. However, a rebel spokesman said they eventually fell back in Brega, losing the industrial section of the key oil port to Gadhafi's forces.
Despite this loss, the momentum appears to be swinging in the rebels' favor. The Libyan opposition also received a political boost Friday with the defection of Abdel-Salam Jalloud, a close associate of Gadhafi who took part in the 1969 coup that brought the Libyan ruler to power.
Opposition fighters elsewhere also reported major advances. Further west, rebels also claimed to have taken control of Zlitan, 90 miles southeast of Tripoli.
The Associated Press contributed to this report.