Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

KABUL, Afghanistan — An errant U.S. airstrike confirmed by the Pentagon killed 12 Afghan National Police officers and wounded two others, Helmand provincial police chief Abdul Ghafar Safi said Saturday.

The death toll in Friday's airstrike was determined after a site inspection of the compound in Gereshk District, he said.

The United States in a statement confirmed that the airstrike on the Security Forces compound happened during a U.S.-supported operation against Taliban insurgents in the area. In the statement the U.S. offered its condolences to the families of the security forces who were killed.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

While much of Helmand province is under the control of Taliban, Afghan national security forces have been waging fierce battles to retake territory. NATO and U.S. troops are in Helmand to assist Afghan troops.

Related: U.S. Now Waiting Days to Announce Deaths in Afghanistan

Safi told The Associated Press in a telephone interview that the dead were police officers who were operating with the army in the area. He said they had recaptured the post from the Taliban when the airstrike occurred. On Friday, the Helmand Gov. Hayatullah Hayat said it was believed the police officers were not in uniform, which may have resulted in mistakenly identifying them as Taliban fighters.

Afghan security officials patrol after installing the national flag in a square after taking over control of the Nawa district following an operation against Taliban militants in Helmand, Afghanistan, on July 19, 2017. WATAN YAR / EPA

Elsewhere in Afghanistan in northern Badakhshan province, Gov. Ahmad Faisal Bigzad said Saturday that 11 police were killed and another six wounded during a roaring battle with Taliban insurgents in the remote Tagab region.

Related: Pentagon Weighs More Aggressive Role in Afghanistan

Bigzad said another 20 members of a local police force were missing following Friday's firefight. It wasn't immediately clear if they had been kidnapped or had escaped.

The area in which the fighting occurred is tucked inside a mountainous region where access is restricted and even telephone contact is erratic.