Gen Raziq (C) was a powerful opponent of the Taliban. Photo: AFP
A top Afghan security commander, Kandahar police chief Gen Abdul Raziq, has been shot dead by a bodyguard.
Taliban militants claimed the attack after a high-level meeting inside the governor's compound, saying they had targeted Gen Raziq and top US commander Gen Scott Miller, who escaped.
The local intelligence head was also killed and the governor was critically injured. Three Americans were hurt.
The attack in Kandahar city comes ahead of elections on Saturday.
In a statement, the Taliban referred to Gen Raziq as a "brutal police chief". It said it had targeted both him and Gen Miller, but the Pentagon denied that the US commander was among the key targets.
Initial reports said the attacker was killed in an ensuing shoot-out.
The assassination is seen as a hugely significant victory for the Taliban and a major blow to the Afghan and US counter-insurgency campaign.
It is the first time since the 2001 US-led military intervention that the top commander of US/Nato forces has been involved in such an incident.
US Defense Secretary Jim Mattis said the attack would not affect the US military's movements in Afghanistan.
Afghan and international security officials said Gen Raziq was shot in the back as he left the meeting and walked towards an area where the helicopter taking the US group back to Kabul was coming in to land.
"Provincial officials including the governor, the police chief and other officials were accompanying the foreign guests when the gunshots happened," said Jan Khakrezwal, head of the Kandahar provincial council.
There are reports that the local army commander also died. Local officials suggested that Gen Miller appeared to have been saved by his body armour. The US military only said that he was uninjured.
At least two hand grenade explosions were also reported.
Gen Miller paid tribute to Gen Raziq, saying he had "lost a great friend".