A senior US commander has narrowly escaped a gun attack in which top Afghan security officials were killed.
The gunman, reported to be acting as a bodyguard, opened fire as officials left a meeting in Kandahar province.
Provincial police chief Gen Abdul Raziq died, as did the head of the NDS intelligence service. The Kandahar governor was critically injured.
US commander Gen Scott Miller escaped unhurt but three other US citizens were also severely injured, Nato said.
Unconfirmed reports from local officials suggest that Gen Miller appeared to have been saved by his body armour.
Initial reports say the attacker was killed.
- Why Afghanistan is more dangerous than ever
- Counting the cost of Trump’s air war in Afghanistan
At least two hand grenade explosions were also reported by officials.
The Taliban said they carried out the attack – one of the most devastating targeted attacks since the war in Afghanistan began in 2001 – and that Gen Miller and Gen Raziq were the targets. In a statement, the group referred to Gen Raziq as a “brutal police chief”.
Loss of a powerful Taliban opponent
By Dawood Azami, BBC World Service
This is one of the most important security incidents of the past 17 years – in which nearly the entire leadership of a province has been eliminated.
While Gen Raziq, 40, was the provincial police commander of Kandahar, his influence went beyond his native province. Over the past few years, he had emerged as one of the most powerful military and political figures in Afghanistan.
He was considered as one of the strongest opponents of the Taliban and Pakistan and had transformed himself into a symbol of the anti-Taliban struggle in Afghanistan. He had previously survived nearly 20 attempts on his life.
In the absence of such experienced and die-hard figures, the Taliban could mount a campaign to increase their territorial control as the loss of an important leader opens a window of opportunity for the militants.
Violence in Afghanistan has been escalating ahead of Saturday’s elections.
Afghan and international security officials said Gen Raziq had been shot in the back as he left the meeting and died from his wounds.
“Provincial officials including the governor, the police chief and other officials were accompanying the foreign guests to the plane when the gunshots happened,” said Jan Khakrezwal, head of the Kandahar provincial council.
The BBC’s Secunder Kermani in Kabul says Gen Raziq was a powerful opponent of the Taliban.
Nato spokesman Col Knut Peters said the wounded Americans had been evacuated.
“Initial reports indicate this was an Afghan-on-Afghan incident,” Col Peters said. “We are being told the area is secure.”
- Taliban ‘met senior US envoy’ in Qatar
- Afghan civilian deaths ‘hit record high’
- Taliban ‘threaten 70% of Afghanistan’
Last year, Gen Raziq himself narrowly escaped a bomb attack on the Kandahar governor’s guesthouse.
Five officials from the United Arab Emirates (UAE) died in that attack along with the deputy governor, two senior Afghan officials and two MPs.