The ceremony was held in a central market as US Marines and Afghan troops slogged through bomb-laden fields in the north of the town. The Marines and their Afghan partners are trying to secure a 28-square mile area believed to be the last significant pocket of Taleban insurgents in Marjah.

Militants and allied troops are still getting caught up in gunfights in some areas, NATO said.

But the number of residents returning has increased in recent days, shops have opened to sell telephones and computers alongside fresh fruits and vegetables, and officials hailed the installation of Abdul Zahir Aryan as the town's administrator as a key sign of progress.

Some 700 residents gathered to see Aryan formally appointed as the top government official in Marjah, along with government officials and Brig. Gen. Larry Nicholson, commander of US Marines in Marjah, according to officials at the event.

Aryan and a team of advisers held their first meeting in the town Monday and have been staying overnight in a building there since Tuesday, said Marlin Harbinger, the senior US government representative for Helmand province, which contains Marjah.

"Today's event was the civilian Afghan government re-establishing itself officially in front of the local residents," Harbinger said. The Afghan army had previously raised the country's green-and-red flag nearby, but that was only a claim of military control over that neighborhood, he said.

The ceremony opened with a recitatioin from the Holy Qur'an, and then Aryan and the Helmand governor pledged to those gathered that they were ready to listen to their needs and eager to provide them with basic services that they didn't have under the Taleban.

After the ceremony, the generals and high-level officials departed in helicopters, but Aryan remained.

The mass assault in southern Helmand province, with 15,000 NATO and Afghan troops, is the largest military operation in Afghanistan since the US-led ouster of the Taleban regime in 2001.