ABC--The attack in southern Kandahar province was the first deadly violence linked to the aftermath of the US army sergeant's killing spree and came hours after hundreds of students chanting "death to America" took to the streets of Jalalabad.
Two of president Hamid Karzai's brothers were in the delegation at the service, which came under sustained gunfire, a local reporter at the scene in Panjwayi district said on Tuesday.
"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 said.
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 - nine of them 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, said.
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 away, while others remained to continue an investigation into Sunday's shootings, a member of the delegation said.
Earlier, hundreds of students chanting "death to America" and proclaiming holy war staged Afghanistan's first protest against the massacre.
The mob blocked the main highway from Jalalabad to the capital Kabul.
"Jihad (holy war) is the only way to get the invading Americans out of Afghanistan," one banner read, before the protesters dispersed peacefully after about two hours.
The demonstration followed a call by parliament for the public trial of the shooter.
The demonstrators also demanded Mr Karzai reject plans to sign a strategic pact with Washington that would allow US advisers and possibly special forces to remain beyond a 2014 deadline for foreign combat troops to leave Afghanistan.
US defence secretary Leon Panetta said the soldier suspected of the killings could face the death penalty if convicted.
The Pentagon chief said the soldier would be brought to justice under the US military legal code, which allows for the death penalty in some cases.
Mass demonstrations last month, over the burning of copies of the Koran at a US military base, turned violent leading to about 40 deaths.
The US embassy has warned its citizens similar protests could erupt over Sunday's shooting.
Meanwhile, the Taliban has threatened to behead US troops in revenge for the massacre.
"The Islamic Emirate once again warns the American animals that the Mujahedeen will avenge them, and with the help of Allah will kill and behead your sadistic murderous soldiers," Taliban spokesman Zabihullah Mujahid said in an emailed statement.
Mr Obama said the shootings had only increased his determination to get American troops out of Afghanistan.
However, he cautioned there should not be a "rush to the exits" for US forces who have been fighting in Afghanistan since 2001.
He said the drawdown set for the end of 2014 should be done in a responsible way.