Military commanders raised the Afghan flag in the bullet-ridden main market of the Taliban's southern stronghold of Marjah on Wednesday as firefights continued to break out elsewhere in the town between holed-up militants and U.S. and Afghan troops.

About 15,000 NATO and Afghan troops are taking part in the offensive around Marjah, a town of about 80,000 people that was the largest population center in southern Helmand province under Taliban control. NATO hopes to rush in aid and public services as soon as the town is secured to try to win the loyalty of the population.

With the assault in its fifth day, an Afghan army soldier climbed to the roof of an abandoned shop and raised a large bamboo pole with Afghanistan's official green-and-red flag. A crowd including the provincial governor, a few hundred Marine and Afghan troops and handfuls of civilians — Afghan men in turbans and traditional loose tunics who were searched for weapons as they entered the bazaar — watched from below.

The market was calm during the ceremony and Marines there said they are in control of the neighborhood.

But the detritus of fighting was everywhere. The back of the building over which the flag waved had been blown away. Shops were riddled with bullet holes. Grocery stores and fruit stalls had been left standing open, hastily deserted by their owners. White metal fences marked off areas that had not yet been cleared of bombs.

Afghan soldiers said they were guarding the shops to prevent looting and hoped the proprietors would soon feel safe enough to return.

The Marines and Afghan troops "saw sustained but less frequent insurgent activity" in Marjah on Wednesday, limited mostly to small-scale attacks, NATO said in a statement.

Marine officials have said that Taliban resistance has started to seem more disorganized than in the first few days of the assault, when small teams of insurgents swarmed around Marine and Afghan army positions firing rifles, machine guns and rocket-propelled grenades.

The offensive in Marjah — about 380 miles (610 kilometers) southwest of Kabul — is the biggest assault since the 2001 U.S.-led invasion of Afghanistan and a major test of a retooled NATO strategy to focus on protecting civilians, rather than killing insurgents.

Helmand Gov. Gulab Mangal About 40 insurgents have been killed since the offensive began Saturday. Four NATO service members have been killed, and one Afghan soldier.

Even with caution on both the NATO and Afghan side, civilians have been killed too. NATO has confirmed 15 civilian deaths in the operation. Afghan rights groups say at least 19 have been killed.

Insurgents are increasingly using civilians as human shields — firing at Afghan troops from inside or next to compounds where women and children appear to have been ordered to stand on a roof or in a window, said Gen. Mohiudin Ghori, the brigade commander for Afghan troops in Marjah.

"Especially in the south of Marjah, the enemy is fighting from compounds where soldiers can very clearly see women or children on the roof or in a second-floor or third-floor window," Ghori said. "They are trying to get us to fire on them and kill the civilians."

Ghori said troops have made choices either not to fire at the insurgents with civilians nearby or they have had to target and advance much more slowly in order to distinguish between militants and civilians as they go.

One Afghan soldier said that he has seen many civilians wounded as they were caught in the crossfire.

"I myself saw lots of people that were shot, and they were ordinary people," said Esmatullah, who did not give his rank and like many Afghans goes by one name. He said some were hit by Taliban bullets and some by Marine or Army troops.

Taliban "were firing at us from people's homes. So in returning fire, people got shot," he said.

In northern Marjah, U.S. Marines fanned out through opium poppy fields, dirt roads and side alleys to take control of a broader stretch of area from insurgents as machine gun fire rattled in the distance.

The Marines found several compounds that had primitive drawings on their walls depicting insurgents blowing up tanks or helicopters, a sign that Afghan troops say revealed strong Taliban support in the neighborhood.

Lt. Col. Brian Christmas, commander of 3rd Battalion, 6th Marines, said security has improved enough in the north of town for Afghan police to step in. Other Marine units have taken control of main locations in the center of town.

"Bringing in the Afghan police frees up my forces to clear more insurgent zones," Christmas said.

Combat engineers were building a fortified base at the entrance of town for the police, who are expected to arrive Thursday.

Afghan police chosen for the task in Marjah were selected from other regions of the country instead of Helmand province, Marine officials said, in order to avoid handing over day-to-day security to officers who may have tribal or friendship ties to the Taliban.

Three convoys of police officers deployed to Marjah on Wednesday, the Helmand governor, Mangal, told reporters in Lashkar Gah, the nearby provincial capital, after the flag-raising. He did not say how many officers were in the convoys.

Mangal said the plan is that Afghan and allied troops will turn neighborhoods over to Afghan police as they are secured.

"Life is returning to normal," he said. "You can see the people are busy in their daily lives. Some shops are still closed but once they arrest the enemy, hopefully, the shops will reopen too."

Troops are encountering less fire from mortars and RPGs than at the start of the assault, suggesting that the insurgents may have depleted some of their reserves or that the heavier weapons have been hit, the Afghan brigade commander Ghori said.

But Taliban fighters have not given up. Insurgent snipers hiding in haystacks in poppy fields have exchanged fire with Marines and Afghan troops in recent days as they swept south.

A Marine spokesman said the zone appeared quieter Wednesday than on previous days, but was likely to flare up again.

"This thing is going to have peaks where we establish ourselves, and then they're going to make the next push into the city," Capt. Abraham Sipe said.

NATO said it has reinstated use of a high-tech rocket system that it suspended after two rockets hit a house on the outskirts of Marjah on Sunday, killing 12 people, including at least five children.

The military coalition originally said the missiles went hundreds of yards off target but said Tuesday that it determined that the rockets hit the intended target.

Afghan officials said three Taliban fighters were in the house at the time.