An Afghan soldier was killed and a policeman wounded on Tuesday as gunmen opened fire on a government delegation at a service for 16 villagers killed by a US soldier, an official said.

"One or more enemy were hiding there. When the delegation arrived they fired -- one soldier is dead and a policeman is injured. A search operation is under way," interior ministry spokesman Sediq Sediqqi told AFP.

A local reporter at the scene in Panjwayi district of southern Kandahar province told AFP that two of President Hamid Karzai's brothers were in the delegation from Kabul, along with provincial government officials.

"There was an armed attack on them from a distance and the firing continued for about 10 minutes," he said.

"Bullets were coming like rain on us," another witness told AFP.

Taliban insurgents have vowed revenge for the killings by the US soldier, who walked out of his base in the early hours of Sunday morning, broke into three village houses and killed 16 people -- mainly women and children.

US forces in a helicopter had spotted the insurgents closing in on the ceremony but were told not to fire on them, one villager, who was sitting near Kandahar police chief General Abdul Raziq at the ceremony, told AFP.

He heard a police officer telling the general: "They (foreign soldiers) are saying that 12 armed men are spotted by the helicopters and asking 'should we shoot them?'"

According to the witness, the police chief replied: "No don't shoot them, send your men out there." Minutes later the shooting started.

The delegation had left the area, with some heading back to Kandahar city, about 45 kilometres (28 miles) away, while others remained to continue an investigation into Sunday's shootings, a member of the delegation said.