The rebels' setback at the city of Zawiya, 30 miles (50 kilometers) west of Tripoli, was the second in as many days. A large arms and ammunition depot outside the city of Benghazi, the largest city in the rebel-held east of the country, blew up Friday in a massive explosion that completely destroyed an area three times the size of a soccer field.
Ambulance drivers who rushed to the site reported that at least 26 people were killed in the blast.
Associated Press photographers who arrived at the site of the explosion Saturday saw entire buildings, cars and trees flattened and smoldering as a result of the blast.
It was not immediately clear how the depot blew up, but suspicion immediately fell on Gadhafi agents seeking to deny the rebels the arms and ammunition they need to fight their way westward toward the Gadhafi-held city of Sirte on the Mediterranean coast.
The rebels, however, fared better elsewhere, capturing the key oil port of Ras Lanouf from pro-Gadhafi forces in their first military victory in a potentially long, westward march from the east of the country to the capital Tripoli hundreds of miles to the west.
The contrasting fortunes of the two sides over the past 24 hours suggest that the conflict in Libya, which began Feb. 15 with anti-Gadhafi protests, could endure for weeks and maybe months, with neither side mustering enough military power to decisively defeat the other.
Witnesses said Ras Lanouf, about 87 miles (140 kilometers) east of the Gadhafi stronghold of Sirte, fell to rebel hands on Friday night after a fierce battle with pro-regime forces who later fled.
An AP reporter who arrived in Ras Lanouf late Saturday morning saw Libya's red, black and green pre-Gadhafi monarchy flag adopted by the rebels hoisted over the town's oil facilities. The witnesses spoke on condition of anonymity because they feared reprisals.
One of the rebels, Ahmed al-Zawi, said the battle was won after Ras Lanouf residents joined the rebels.
"We won the battle when the people joined us," said al-Zawi, who took part in the fighting. He said 12 rebels were killed in the fighting, in which rocket propelled grenades and anti-aircraft guns were used.
Officials at a hospital in the nearby city of Ajdabiya, however, said only five rebels were killed in the attack on Ras Lanouf and that 31 others were wounded.
There was no explanation immediately available for the discrepancy in the figures.
"They just follow orders. After a little bit of fighting, they just run away," said another rebel at Ras Lanouf, Borawi Saleh, an 11-year veteran of the army who is not an oil company employee.
The march on Sirte, said al-Zawi, would start after the rebels regroup and reorganize.
In Zawiya, witnesses said forces loyal to Gadhafi, Libya's ruler of 41 years, were inside the city after overcoming rebel positions with heavy mortar shelling and machine gun fire. They said the shelling damaged government buildings and homes.
The hours-long attack started at dawn and the rattle of gunfire and explosions could be heard as the witnesses spoke to the AP by phone. They also spoke on condition of anonymity, fearing for their own safety.
They said several fires were raging in Zawiya on Saturday and that heavy black smoke hung over many parts of the city of some 200,000 people. They said snipers were shooting on sight anyone on the streets or residents who venture out on their homes' balconies.
The city's rebels, they said, had retreated to take new positions deeper inside the city.
"We will fight them on the streets and will never give up so long as Gadhafi is still in power," said one of the rebel fighters, who also spoke on condition of anonymity for fear of reprisals.