Libyan transitional government forces launched their biggest assault yet on Muammar Gaddafi's hometown of Sirte on Friday, firing heavy artillery at the last major bastion of support for the deposed leader.
Taking the coastal town would bring Libya's new rulers closer to finally gaining control of the whole country almost two months after they seized the capital Tripoli, but they are also under pressure to spare the civilians trapped inside.
Forces loyal to the ruling National Transitional Council (NTC), who for weeks have waited on the edge of Sirte, now say the battle is entering its final and decisive phase.
NTC commander Mustafa Al-Ameen, standing on a hill on the eastern outskirts overlooking the city, said while progress was being made, there was still resistance from Gaddafi loyalists.
"The forces that went in managed to advance into Sirte but we couldn't go further because of sniper fire," he said.
The prolonged struggle of the NTC to capture a few remaining bastions of pro-Gaddafi loyalists has sidetracked its effort to establish effective government over the sprawling North African state and rebuild oil production vital to its economy.
Columns of black smoke rose above Sirte's skyline as NTC forces fired tank shells and rounds of artillery toward the city centre from their positions to the east.
Inside Sirte, on its northeastern corner, fighters said they had cleared out what is known locally as the "Mauritanian neighbourhood" after intense building-by-building fighting.
Thousands of civilians have fled Sirte as fighting has intensified, describing increasingly desperate conditions for those inside the Mediterranean seafront city. One resident spoke of the stench of rotting corpses in the hospital.
Reflecting growing international disquiet, a senior United Nations envoy urged NTC fighters battling their way into the city not to take reprisals against Gaddafi supporters.
Anti-Gaddafi commanders started the day predicting a swift conclusion to the fighting and, for the first time in days, forces in the west and south of the city joined units in the east in a coordinated assault.
NTC trucks with ammunition and artillery batteries were brought forward to the eastern front line, 1.2 km (0.8 miles) from the city centre.
But Gaddafi loyalists used sniper fire and rocket-propelled grenades to prevent NTC forces from entering the city centre.
Reuters reporters in the east of Sirte saw one NTC fighter hit in the head, apparently by a bullet fired by a sniper.
At a dressing station outside Sirte, surgeon Nuri Al-Naeri said that 12 people had been killed in fighting on the western side of the city on Friday, and another 139 were wounded.
"A lot of injuries were from snipers," he said.
Risk of reprisals
Along with the interior desert town of Bani Walid, Sirte is one of the last redoubts of Gaddafi loyalists in the country he ruled alone for 42 years.
It presents a particular challenge for Libya's new rulers. A drawn-out battle with many civilian casualties will breed hostility that will make it very difficult for the NTC to unite the country once the fighting is over.
The senior U.N. official in Libya, Ian Martin, appealed to NTC fighters not to aggravate those tensions by exacting violent revenge against Gaddafi supporters in Sirte.
"We are expressing our concern that the situation ends in a way that lays the foundations for national reconciliation rather than exacerbates the problems that a new government will face," Martin told Reuters in an interview.
"It's extremely important that the fighting ends in a way that respects the calls of the leadership of the NTC not to take revenge but to bring to justice within the law those who are responsible for war crimes on the other side."
That will be a difficult message to convey to NTC fighters, most of who come from cities where Gaddafi is reviled. At a luxury hotel in the east of the city, one smiling government fighter carried away a statue of Gaddafi sitting on a camel that had been placed in the reception area.
NTC officials say they believe one of Muammar Gaddafi's sons, Mo'tassim, is in Sirte, though the ex-leader himself is though to be far to the south in the Sahara desert.
Sirte, once a sleepy fishing village, was transformed by Gaddafi into a second capital. He built lavish hotels and conference halls to host foreign leaders.
Wounded civilians
The extended fighting has raised concerns for civilians in the city of 75,000 people.
At a field hospital several kilometres west of Sirte, dozens of ambulances brought in at least 50 fighters and civilians wounded in the fighting. Most were seriously wounded.
Medical workers tried to save an unresponsive woman. A child with a wounded leg sat on the floor. A helicopter landed near the hospital to carry some of the wounded to hospitals in Misrata, which lies west of Sirte.
Fleeing residents said they ran a gauntlet of shelling and small arms fire to escape.
"We didn't know there was going to be an assault," said Saeed Ramadan, whose vehicle had shrapnel holes and a broken window. "I couldn't sleep last night, there was very heavy shelling. I was afraid for my kids and had to get them out."
A Sirte resident who gave his name as Abdel Nasser said: "Last night there was heavy random firing and shelling. We had a hundred narrow escapes. Conditions are tragic. You can smell the rotting corpses at the hospital."
Medical workers who fled Sirte said patients at the Ibn Sina hospital were dying on the operating table because there was no oxygen and no fuel for the hospital's generators.
Hassan Briek, another fleeing resident, said fewer than half of Sirte's residents remained in the city and most had moved to three neighbourhoods where there had been less fighting.
"There are lots of families in those districts of the city," Briek said. "No one knew there was going to be an assault today. No one is sleeping. Food isn't the problem. It's the shelling."