Moammar Gaddafi's fighters have beaten back an attempt by Libya's new government to crush remnants of the old regime, forcing revolutionary troops into retreat in the mountains and turning Gaddafi's seaside hometown into an urban battlefield of snipers firing from mosques and heavy weapons rattling main boulevards.
The tough defense on Friday of the holdout towns of Sirte and Bani Walid displayed the firepower and resolve of the Gaddafi followers and suggested Libya's new rulers may not easily break the back of regime holdouts. It also raised fears the country could face a protracted insurgency of the sort that has played out in Iraq and Afghanistan.
"The Gaddafi loyalists have so many weapons," cried Maab Fatel, a 28-year-old revolutionary fighter on the front lines in the mountain enclave of Bani Walid, 90 miles (140 kilometers) southeast of Tripoli.
"This battle is really crazy," Fatel said, his uniform splattered with blood from carrying a wounded comrade.
Revolutionary forces began the day by streaming into Bani Walid but pulled back after intense fighting failed to dislodge pro-Gaddafi snipers and gunners from strategic positions. The two sides traded relentless mortar and rocket fire across a 500-yard-wide desert valley called Wadi Zeitoun that divides the town between north and south.
Mohaned Bendalla, a doctor at a field hospital in nearby Wishtata, said at least six rebels were killed and more than 50 were wounded.
Inside the town, a radio station believed linked to one of Gaddafi's main propagandist kept up a steady stream of appeals to fight and rants that demonized the revolutionaries as traitors who did not honor Islamic values.
"These revolutionaries are fighting to drink and do drugs all the time and be like the West, dance all night," the announcer claimed. "We are a traditional tribal society that refuses such things and must fight it." Ahmed Omar Bani, a military spokesman for Libya's transitional government, dismissed such allegations, saying the revolutionary forces' only goal was "to liberate our people." In Sirte, Gaddafi's birthplace on the Mediterranean coast, his backers rained gunfire down from mosque minarets and high-rise buildings on fighters pushing into the city from the west. In the streets the two sides battered each other with high-caliber machine guns, rockets and rocket-propelled grenades.
At one point, a pickup truck filled with revolutionary forces rushed back to the rear lines, its bed bloodied and strewn with the body parts and mangled face of a fighter who had been manning a machine gun. Other fighters shouting "God is great" pulled out his lifeless remains and comforted his partner, the pickup driver.
NATO warplanes swept overhead, but it was unclear whether there were fresh airstrikes to help the anti-Gaddafi advance. The alliance said it struck multiple rocket launchers, air missile systems, armored vehicles and a military storage facility in Sirte on Thursday when revolutionary units launched the offensive.
Gaddafi's spokesman, Moussa Ibrahim, said loyalist forces inflicted a heavy blow Friday on their enemies, killing many and taking many others hostage.
"We have the ability to continue this resistance for months," he said in a phone call to Syrian-based Al-Rai TV, which has become the mouthpiece for the former regime.
Ibrahim said some Gaddafi supporters have infiltrated the revolutionary forces and were working to sabotage them from the inside.
Despite the latest setback, Bani, the military spokesman, said Libya's new rulers hoped to liberate the whole country by the end of this month.
The loyalists still hold a swath of Libya along the central coast and into the southern deserts more than three weeks after revolutionary fighters swept into Tripoli and drove out Gaddafi. The whereabouts of the ousted leader and several of his sons remain unknown.
Hundreds of former rebels have massed deep in the southern desert and were trying to negotiate with villagers in a pro-Gaddafi area to surrender peacefully and avoid bloodshed.
The fighters captured an air base about 45 miles (70 kilometers) north of the loyalist stronghold of Sabha on Thursday. Col. Bashir Awidat, who is from the Wadi Shati region, said they need to secure the area before moving against Sabha.
Awidat said two former rebels and four loyalists were killed in the fighting, and that they had taken 14 prisoners.
He added that the villagers had been isolated and believed Gaddafi's propaganda.
"They think that we'll raid their houses and rob them.
The media coverage here has been bad for 42 years and it has trained people to think a certain way, and that will take time to change," he told The Associated Press at the air base.
The new leadership has been gaining international support in its campaign to root out the rest of Gaddafi's regime and establish authority. French President Nicholas Sarkozy, British Prime Minister David Cameron and Turkish Prime Minister Recep Tayyip Erdogan all visited Tripoli this week.
Erdogan joined Friday prayers in Tripoli's Martyrs' Square, the heart of the city once known as Green Square where Gaddafi's regime threw rallies of supporters before his fall.
"You have shown the whole world that no one can stand before the power and the will of the people," Erdogan told a cheering crowd of thousands. He predicted the Syrian regime would be next to fall, saying "the era of autocracy is ending." The U.N. General Assembly also voted Friday to give Libya's seat in the world body to the National Transitional Council, which is the closest thing the oil-rich North African nation has to a government.
The vote means that a senior council official will be able to join world leaders and speak for Libya at next week's ministerial session of the General Assembly, and participate in meetings.