KABUL, Afghanistan — A coalition airstrike in a province north of Kabul killed at least two Afghan villagers on Wednesday morning, prompting President Hamid Karzai to order an official inquiry and escalating tensions yet again between the allies over civilian deaths.

While details of the fighting in the Seya Gerd district of Parwan Province remained sketchy, officials confirmed that a strike had been called in after Afghan and coalition Special Operations advisers took heavy fire during a mission to clear the area. The gunfight, which took place in an insurgent stronghold used to carry out attacks on Bagram Air Base, claimed the life of one coalition soldier, at least 10 Taliban fighters and several civilians, though the exact number was not yet clear, coalition and Afghan officials said.

Civilian casualties have always been a contentious issue in Afghanistan, but perhaps never more so than now. With the fate of a long-term security deal between the United States and Afghanistan hanging in the balance, Mr. Karzai has made a cessation of the airstrikes a precondition of any agreement. In late November, after a drone strike claimed the lives of civilians in southern Helmand Province, the president all but threatened to cancel the deal.

The civilian deaths on Wednesday are likely to worsen the relationship between the Afghans and Americans, a partnership that seems to grow more strained with every passing week. Mr. Karzai’s recent order to release dozens of prisoners believed to have killed American forces, despite weeks of threats of a troop withdrawal by the United States, caused the latest dispute between the allies.