KABUL, Afghanistan  The Afghan Defense Ministry and local officials in Badghis Province said on Saturday that seven members of the Afghan security forces had been killed in a NATO airstrike the day before that was part of an effort to aid a beleaguered Afghan and NATO operation against the Taliban.

A NATO spokesman confirmed that the seven Afghan officers had been killed, as well as an Afghan civilian working with the Afghan forces. The organization is investigating whether its close air support was responsible for the casualties. According to NATO, five American soldiers were wounded in the operation against the militants, along with 15 Afghan soldiers, two Afghan police officers and one Afghan civilian working with the troops.

If NATO close air support is responsible for the casualties, it would be one of the worst cases of friendly fire in the course of the eight-year war.

The troops were in rural Badghis Province in the country’s far northwest, in a relatively flat area, traversed by the Morghab River. They were searching for two American soldiers who had been missing since Wednesday. The Americans had vanished while on a resupply mission.