Last updated 11:20 a.m. ET
Muammar Qaddafi loyalists swept into the opposition-held city of Zawiya on Saturday, tightening security around the regime-held capital of Tripoli.
To the east, rebel forces captured a key oil port.
CBS News correspondent Mark Phillips reporting from Tripoli says both sides have claimed to be in control of Zawiya, after a battle appears to have swept back and forth through the town. A government counterattack was reported this morning, but eyewitnesses say the rebels are still in control at a cost of dozens of lives.
The rebels have small arms and try to make up in enthusiasm what they lack in weaponry and experience. The government forces have heavier guns, and have proven stubborn to dislodge.
But in Tripoli itself, attempts at the sort of mass anti-government demonstrations that overturned regimes in Egypt and Tunisia have not worked here. Several hundred demonstrators were beaten back by Qaddafi's security forces after Friday prayers.
Phillips says the situation is still very much in flux, with the latest news being that the rebels are moving west along the road from Benghazi toward Tripoli.
Phillips says the key to the whole conflict involves whether or not the rebels can get government-armed units in Tripoli to come over to their side (as they did in Benghazi and further to the east). That has not happened yet, and with the close ties between those military units and members of the Qaddafi family, Phillips says, that is not a likely scenario.
A revolutionary council has set up in Benghazi and begun to act like the government.
The issue is that neither side really has the strength to cause the other one to submit.
So this is looking like a stalemate, Phillips says, and it could be weeks or months before there is a resolution.
Qaddafi, who has led the country virtually unchecked for four decades, has unleashed a violent crackdown against those seeking his ouster, drawing international condemnation and sanctions.
Hundreds have been killed, perhaps more, putting pressure on the international community to do more to stop the crackdown on protests that began on Feb. 15, inspired by successful uprisings in Egypt and Tunisia, its neighbors to the east and west respectively.
President Barack Obama has insisted that Qaddafi must leave and said his administration was considering a full range of options, including the imposition of a "no-fly" zone over Libya.
So far, Qaddafi has had little success in taking back territory, with the entire eastern half of the country and some cities near the capital under rebel control. But the opposition forces have had limited success in marching on pro-Qaddafi areas, leading to a standoff that could last for weeks and maybe months, with neither side mustering enough military power to decisively defeat the other.
Saturday's assault on Zawiya, a city of some 200,000 people just 30 miles west of Tripoli, began with a surprise dawn attack by pro-Qaddafi forces firing mortar shells and machine guns.
Witnesses who spoke to The Associated Press by telephone with the rattle of gunfire and explosions in the background said the shelling damaged government buildings and homes. The fighting sparked several fires, sending a cloud of heavy black smoke over the city, and witnesses said snipers were shooting at anybody on the streets, including residents who ventured onto balconies.
Initially, the rebels retreated to positions deeper in the city before they launched a counteroffensive in which they regained some of the lost territory, according to three residents and activists, who spoke on condition of anonymity for fear of reprisals.
By midafternoon, the rebels had reoccupied central Martyrs' Square while the pro-regime forces regrouped on the city's fringes, sealing off the city's entry and exit routes, the witnesses said.
"We will fight them on the streets and will never give up so long as Qaddafi is still in power," said one of the rebels, who also declined to be identified for the same reason.
Pro-Qaddafi forces on foot and firing artillery, mortars and other heavy weapons launched a new attack on Zawiya in late afternoon from the south and west, two other witnesses said by telephone.
The anti-Qaddafi rebels fared better elsewhere, capturing the key oil port of Ras Lanouf on Friday night, their first military victory in a potentially long and arduous westward march from the east of the country to Tripoli.
Witnesses said Ras Lanouf, about 90 miles east of pro-Qaddafi Sirte, fell to rebel hands on Friday night after a fierce battle with pro-regime forces who later fled.
An Associated Press reporter who arrived in Ras Lanouf Saturday morning saw Libya's red, black and green pre-Qaddafi monarchy flag, which has been adopted by the rebels, hoisted over the town's oil facilities.
One of the rebels, Ahmed al-Zawi, said the battle was won after Ras Lanouf residents joined the rebels.
Al-Zawi, who participated in the fighting, 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 and 31 wounded in the attack. The discrepancy in the figures could not immediately be explained.
"They just follow orders. After a little bit of fighting, they run away," said another rebel at Ras Lanouf, Borawi Saleh, an 11-year veteran of the army who is now an oil company employee.
The march on Sirte, said al-Zawi, would start after the rebels regroup and reorganize.
In the rebel-held east of the country, meanwhile, a large arms and ammunition depot outside Benghazi, Libya's second-largest city, blew up Friday in a massive explosion that completely destroyed an area three times the size of a soccer field.
Ambulance drivers told AP Television News that at least 26 people had been killed in the blast, which flattened entire buildings, cars and trees. It also deprived the rebels of arms and ammunition needed to fight their way westward toward Sirte on the Mediterranean coast.
It was not immediately clear how the depot blew up, but suspicion immediately fell on Qaddafi agents.