KABUL, Afghanistan  United States forces killed six Afghan police officers and one civilian on Wednesday during an assault on the hide-out of a suspected Taliban commander, the authorities said, in what an American military spokesman called a “tragic case of mistaken identity.” Thirteen Afghan officers were also wounded in the episode.

A statement issued jointly by the American and the Afghan military commands said a contingent of police officers fired on United States forces after the Americans had successfully overrun the hide-out, killing the suspected Taliban commander and detaining another man.

The statement said the Americans had already entered the hide-out, a building in Qalat, the capital of the southern province of Zabul, when they came under attack by small-arms fire and rocket-propelled grenades from “a compound nearby.”

“Multiple attempts to deter the engagement were unsuccessful,” the statement said.

The Americans, concerned about women and children hiding in the building they had taken, returned fire using small arms and aircraft, the statement said.