Libyan rebels say they have seized control of parts of the strategic city of Zawiya, a claim the Libyan government denies.
Rebels say they pushed farther into western districts of the coastal city on Sunday, despite intense clashes with forces loyal to leader Moammar Gadhafi.
Zawiya is near a major highway and is just 50 kilometers west of Tripoli. Rebel control of the city would cut off Tripoli from its supply lines.
Television video on Sunday showed rebels hoisting pre-Gadhafi-era flags over the city and firing celebratory shots into the air. However, a Libyan government spokesman said the government remained in control. Moussa Ibrahim said pro-government forces had stopped a small group of rebel fighters and were in the process of defeating them.
Zawiya has changed hands several times. It was one of the first cities to rebel against Mr. Gadhafi, shortly after the anti-government uprising began in February.
In other developments Sunday, opposition fighters claimed they had made advances in Brega. The oil port town east of Tripoli has been the scene of a series of recent clashes with pro-Gadhafi forces.
Also Sunday, Reuters news agency quotes opposition fighters as saying they are battling for control of the town of Gharyan, about 80 kilometers south of Tripoli. Rebels and pro-government forces have been fighting near the town for several days.
Opposition fighters backed by NATO airstrikes have been pushing since February to gain control of the capital in their bid to unseat Mr. Gadhafi.
On Saturday, a Libyan government official slammed U.N. Secretary-General Ban Ki-moon for comments he made earlier in the week about civilian casualties.
Mr. Ban expressed concern Thursday about the rising number of civilian deaths and urged all sides to “exercise extreme caution.”
Libya's Deputy Foreign Minister Khaled Kaim said that Mr. Ban's remarks were “unacceptable” because they did not single out NATO as being responsible for civilian deaths.
On Tuesday, Libya accused NATO of killing 85 people in a village near the western town of Zlitan. NATO said its warplanes had hit targets in the area the previous day but denied evidence of civilian casualties.