United States airstrikes killed 17 policemen by mistake during a battle with insurgents in the country's southern Helmand province, Afghan and US military officials said on Friday.

Attaullah Afghan, head of the provincial council, said the airstrikes took place around 9pm (local time) on Thursday outside the province's capital of Lashkar Gah, during clashes between Afghan police and the Taliban.

Afghan added that 14 policemen were also wounded in the strikes.

Deadly incidents of friendly fire in US military support for its Afghan allies have happened before, but are not common. Afghanistan's beleaguered security forces come under near daily attacks by Taliban insurgents even as the US is trying to broker a peace deal to end nearly 18 years of war.

A US military spokesman, Col. Dave Butler, said the airstrike was called in by Afghan security forces who were taking heavy fire from Taliban fighters.

Before dropping the bombs, Butler said the US along with its allies on the ground sought to ensure the area was clear of friendly forces. An Afghan coordination force reported the targeted areas were safe from fellow personnel.

“Unfortunately, they were not and a tragic accident resulted,” Butler said in a written reply to an Associated Press request for information on the deaths.

He said both Afghan security forces and Taliban were killed in the strike.

“We're examining the miscommunication to ensure it is not repeated,” said Butler. “We regret this tragic loss of life of our partners and are committed to improvement every day with every mission.”

Helmand's governor, Mohammad Yasin, said Afghan authorities were also investigating. A Taliban statement claimed US forces were behind the incident.

In the last year, the number of US airstrikes has risen, most often in response to Afghan requests for assistance, but also in an intensified campaign against the militant Islamic State group's fighters, who are mostly headquartered in eastern Afghanistan.

A higher frequency of US airstrikes has led to more civilian deaths, according to United Nations reports. A quarterly estimate by the UN issued recently said more civilians were killed by Afghan and US forces than by insurgents in the first months of 2019.