KABUL—Two U.S. Special Forces troops and at least 30 Afghans were killed during a firefight with the Taliban in Afghanistan’s Kunduz province, officials said,

A provincial spokesman said 30 Afghan civilians were killed early Thursday in U.S. airstrikes that were called in to support troops under fire by Taliban snipers. A joint U.S.-Afghan operation had been targeting Taliban commanders northeast of the city of Kunduz when the troops came under heavy gunfire around 3 a.m., a coalition member said.

In...