GWER, Iraq — With American strikes beginning to show clear effects on the battlefield, Kurdish forces counterattacked Sunni militants in northern Iraq on Sunday, regaining control of two strategic towns with aid from the air.

The American airstrikes, carried out by drones and fighter jets, were intended to support the Kurdish forces fighting to defend Erbil, the capital of the Iraqi Kurdistan region, according to a statement by the United States Central Command. They destroyed three military vehicles being used by the militant group, the Islamic State in Iraq and Syria, and damaged others, the statement said, adding that the warplanes also destroyed a mortar position.

The wreckage of three heavily armed trucks lay twisted and scorched in Gwer, one of the recaptured towns, a few hours after the strikes, and body parts from at least three militants were scattered nearby. Kurdish militiamen, known as pesh merga, confirmed seeing the airstrikes, and celebrated Sunday afternoon near the still-smoldering wrecks.

The American air support encouraged the Kurdish militiamen to reverse the momentum of the recent fighting and retake Gwer and the other town, Mahmour, both within a half-hour’s drive of Erbil, according to Gen. Helgurd Hikmet, head of the pesh merga’s media office. General Hikmet said some pesh merga fighters had pushed on beyond the two towns, which lie on the frontier between the Arab and Kurdish areas of Iraq.