U.S. forces backed by attack aircraft killed at least 25 Shiite militia fighters north of Baghdad Friday in an operation targeting a cell accused of smuggling weapons from Iran, the military said.

The troops were seeking the commander of a rogue militia group believed to be associated with the Quds Force, an elite branch of the Iranian Revolutionary Guards, the U.S. military said.

Gunmen opened fire on the soldiers with assault rifles and rocket-propelled grenades, and at least one man was carrying what appeared to be an anti-aircraft weapon, the military said. Ground forces called for air support when the fighters kept coming toward them, the military said. Two buildings were destroyed in airstrikes, it said.

The U.S. military said separately that it was investigating the deaths of three civilians who were shot by American troops near a checkpoint set up by Iraqis who have joined forces against extremists.

In Friday's pre-dawn raid on the Shiite militia members, U.S. aircraft repeatedly bombed the neighborhood in Khalis, a Shiite enclave about 50 miles north of Baghdad, according to an Iraqi army official who spoke on condition of anonymity because he was not authorized to release the information. At least 24 were killed, 28 were injured, most of whom were in critical condition, and several others were missing, he said.

He said civilians were killed when they rushed out to help those hurt in the initial bombing.

The U.S. military said it had no reports that any Iraqi civilians were killed.

"Coalition forces only engage hostile threats and take every precaution to protect innocent civilians," it said.

The town's mayor said U.S. forces targeted areas built up by locals to protect their Shiite neighborhood against attacks by Al Qaeda gunmen.

"These places came under attack by American airstrikes," said Khalis Mayor Odai al-Khadran.

Since launching a Baghdad security crackdown more than seven months ago, U.S. troops have increasingly battled splinter groups from the country's most powerful Shiite militia, the Mahdi Army. The Mahdi Army is nominally loyal to al-Sadr, the radical cleric, who in August ordered a temporary freeze on his followers' activities — including attacks on U.S. troops.

The U.S. military describes the splinter factions as "extremist" or "criminal" militiamen.

"We continue to support the government of Iraq in welcoming the commitment by Muqtada al-Sadr to stop attacks and we will continue to show restraint in dealing with those who honor his pledge," Maj. Anton Alston, a U.S. military spokesman, said Friday. "We will not show the same restraint against those criminals who dishonor this pledge by attacking security forces and Iraqi citizens."

Last month, the U.S. military arrested a man suspected of being a ranking officer of the Quds Force, the paramilitary branch of the Revolutionary Guards, which has been accused of arming Shiite militants in Iraq. Iran denies the charges. The arrest has added to the already strained relations between Washington and Tehran.

The U.S. said the arrested Quds officer, Mahmudi Farhadi, was posing as a businessman with an Iranian trade delegation at the time of his arrest in a U.S. raid at a Sulaimaniyah hotel.

In January, five other Iranians accused of being members of the Quds Force were arrested in a U.S. military raid in Irbil. They remain in U.S. detention. Iran says the men were in Iraq on official business.

The investigation into the civilian deaths focused on a shooting Thursday in Abu Lukah, a village just north of Musayyib, about 40 miles south of Baghdad, the military said. The brief announcement did not identify the civilians by sect or provide other details.

The U.S. military is relying heavily on the growing number of Sunni tribes that have turned against Al Qaeda, saying their support is key to a secure Iraq. It also has been trying to extend the movement to Shiites opposed to growing lawlessness among militia factions.

The Americans point to successes in Anbar province, which is now largely peaceful after Sunnis joined the Iraqi military and police force as a way to both protect themselves from extremists and to empower them in the face of the Shiite-led central government in Baghdad.

The U.S. military also reported the death of a U.S. soldier, killed by small-arms fire during operations Thursday in a southern section of the Iraqi capital used by Al Qaeda cells.