Gen Abdul Razeq, one of Afghanistan's most powerful security officials, was killed on Thursday when a bodyguard opened fire following a meeting in the governor's compound in the southern province of Kandahar, officials said.
Gen Scott Miller, the top US commander in Afghanistan who had been at the meeting with Razeq only moments earlier, was uninjured in the attack, but the local commander of the NDS intelligence service was killed and the provincial governor was severely injured, reports Reuters.
The Taliban claimed responsibility for the attack, saying they had targeted both Miller and Razeq, who had a fearsome reputation as a ruthless opponent of the insurgents.
The attack was a devastating blow to the Afghan government ahead of parliamentary elections on Saturday, which the Taliban have vowed to disrupt.
"The brutal police chief of Kandahar has been killed along several other officials," a Taliban statement said.
Razeq was criticised by human rights groups but highly respected by US officers who saw him as one of Afghanistan's most effective leaders, largely responsible for keeping Kandahar province under control.
A flamboyant commander, he had survived several attempts on his life over many years and narrowly escaped an attack last year in which five diplomats from the United Arab Emirates were killed in Kandahar.
Officials said one of the governor's bodyguards opened fire on Razeq as he came out of the meeting with Miller and other officials, severely wounding him and several other senior officials including the governor.
"Provincial officials including the governor, the police chief and other officials were accompanying the foreign guests to the plane when the gunshots happened," said Said Jan Khakrezwal, the head of the provincial council.
NATO spokesman Colonel Knut Peters said Miller, who took command of US and forces and the NATO-led Resolute Support mission in Afghanistan last month, was uninjured but two Americans were wounded in the crossfire.