KABUL, Afghanistan — An American airstrike killed at least a dozen Afghan security forces during intense fighting with the Taliban near the Afghan capital, officials said Tuesday.

Hundreds of armed Taliban militants made a run for the Azra district center in Logar Province, about 50 miles south of Kabul, late on Monday, and the fighting continued overnight, officials said. Shamshad Larawi, a spokesman for the governor, said that American airstrikes had been called in for support, but that because of a misunderstanding, the planes mistakenly targeted an Afghan police outpost.

Mr. Larawi played down the number of casualties, which remained unclear. Members of the provincial council said the strike had killed 12 security personnel, a mix of Afghan police officers and pro-government militia members. Haji Abdul Satar, a tribal elder from Azra, said he counted 19 dead, among them 17 Afghan police officers and pro-government militia members and two civilians.

Lt. Col. Martin O’Donnell, a spokesman for United States forces in Afghanistan, confirmed that the strike had been carried out and said reports that it had killed Afghan forces were being investigated.