KABUL, Afghanistan — For the second time in a few days, an Afghan Army base was destroyed on Wednesday — but this time by American airstrikes that followed a firefight between the Afghans and Americans, Afghan officials said.

A local Afghan official said six soldiers were killed and nine others badly wounded, out of 17 soldiers at the base. Qais Mangal, a spokesman for the Afghan Defense Ministry, confirmed that the airstrikes had taken place after another Afghan unit attacked a joint convoy of Afghan Special Forces and American troops. He put the death toll at five soldiers, with 10 wounded.

An American military spokeswoman said personnel at the Afghan Army post, which she described as a “checkpoint,” had opened fire on the convoy first.

“This is an example of the fog of war,” said Sgt. First Class Debra Richardson. “The U.S. conducted a precision self-defense airstrike on people who were firing at a partnered U.S.-Afghan force.”