A suicide bomber hiding explosives in his turban blew himself up inside a mosque during a memorial service for Afghan president Hamid Karzai's assassinated half brother, officials say.
At least four people were killed.
Among the victims of the attack in Kandahar city was Hekmatullah Hekmat, head of the clerical council for the province, and a young child, the Interior Ministry said.
At least 15 people were wounded, including an MP.
All other high-ranking officials at the ceremony were reported safe in a secure location.
No one immediately claimed responsibility for the attack.
The Sarra Jamai mosque in the south-west of the city had been filled with relatives and friends of Ahmed Wali Karzai, who was killed earlier this week. They were offering their condolences to the family of the provincial leader.
Officials believe the bomber got the explosives past security by hiding them in his turban.
Kandahar Governor Tooryalai Wesa, who was attending the memorial, said he saw the man's turban explode. The attacker approached Hekmat after mourners ended a prayer, the governor said.
"There was a prayer going on and after that prayer the man came close to the director of the religious council and exploded," Wesa said. "It looks like he was targeting the director."
Wali Karzai was shot at close range by a bodyguard, leaving President Karzai without a powerful ally in Kandahar province, a former Taliban stronghold and the site of recent military offensives by the US-led military coalition.
The Taliban claimed responsibility for the killing, which has threatened to create a power vacuum in the south.
Wali Karzai was regarded as the most powerful man in southern Afghanistan. He was head of the provincial council, the influential Populzai tribe, and the Afghan president's confidant and emissary.
The mosque bombing was the second attack in Kandahar city today. Earlier in the morning, a bomb exploded near a police vehicle in the city, killing one civilian, said provincial police Chief Abdul Raziq.
As the conflict intensifies in the south of Afghanistan, the United Nations said that civilian deaths jumped 15 % in the first half of 2011. The UN blamed a rise in insurgent roadside bombings and suicide attacks for the increase.
The UN said 1,462 Afghan civilians lost their lives - many in the crossfire of battle between Taliban insurgents and Afghan, US and Nato forces. During the first half of last year, 1,271 Afghan civilians were killed.
Today officials in eastern Afghanistan accused Nato troops of killing six civilians in an overnight raid, and more than 1,000 people poured into the streets of Khost province in anger.
The military alliance said the joint patrol with Afghan forces in Khost province killed six fighters from a militant group.