An Afghan soldier opened fire on Sunday inside a base in the southern Helmand province, wounding three US soldiers before being shot dead, an Afghan official said.

Col Mohammad Rasoul Zazai, an army spokesman, said the soldier had made a “mistake” and had not fired deliberately. A coalition-run Twitter account said an Afghan soldier shot and wounded three American soldiers, without providing further details.

Several US troops have been killed in Afghanistan in recent years in so-called insider attacks carried out by Afghan police or soldiers. In October, an Afghan man in a military uniform shot dead a US soldier and an American civilian contractor inside a military base in Kabul before being killed.

Most foreign combat troops withdrew from Afghanistan at the end of 2014, 13 years after they ousted the Taliban from power, but about 13,000 Nato-led soldiers remain to help advise and train Afghan forces fighting a revived Taliban insurgency.

Last May, two Romanian soldiers were killed and a third wounded after two members of a local Afghan police unit they were training shot them.

Camp Shorab in Helmand, previously known as Camp Bastion, is a major former US and British base now run by the Afghan army.

Helmand has been one of the most fiercely contested regions of the country, with nearly 1,000 coalition troops killed there since the US-led military intervention in 2001.

The US said in January that about 300 Marines would be sent to Helmand to assist Afghan forces battling the Islamist insurgents in intelligence and logistics matters.

Elsewhere in Afghanistan, Taliban insurgents attacked a district headquarters in the Kandahar province using a suicide car bomb, said Samim Khpolwak, a spokesman for the governor. He declined to say how many people were killed or wounded.

A security official, who spoke on condition of anonymity because he was not authorized to release information, said six police were killed and five others were wounded in the assault, which was claimed by the Taliban.

In the southern Zabul province, an army operation killed 13 Taliban and wounded 11 others, said General Sadiqullah Saberi. He said two Afghan soldiers were killed and three others were wounded by a roadside bomb during the operation.

Two Taliban commanders were killed in an apparent US drone strike in the Barmal district of the eastern Paktika province, said Mohammad Rahman Ayaz, spokesman for the provincial governor.

Another 10 insurgents were killed in a separate drone strike in the Dand-e Patan district of neighboring Paktia province, said Governor Zelmai Wessa.