A U.S.-led raid and air strike targeting networks allegedly smuggling weapons and fighters from Iran killed 32 suspected militants Wednesday in Baghdad's Shiite stronghold of Sadr City, the military said.
The military also said 12 suspects were detained.
"The individuals detained and the terrorists killed during the raid are believed to be members of a cell of a Special Groups terrorist network known for facilitating the transport of weapons and explosively formed penetrators, or EFPs, from Iran to Iraq, as well as bringing militants from Iraq into Iran for terrorist training," the military said.
The statement came after Iraqi police in Sadr City said a bombardment by U.S. helicopters and armored vehicles killed nine civilians, including two women, and wounded six others. The police also said 12 people were detained.
Meanwhile, Iraqi Prime Minister Nouri al-Maliki arrived in Iran on Wednesday for talks expected to focus on bilateral relations and overcoming "terrorism challenges" in his wartorn nation.
It was the Iraqi premier's second visit to Tehran in less than one year.
Iraq, which like Iran is majority Shiite Muslim, has managed a difficult balancing act between Tehran and Washington since the U.S.-led invasion in 2003, trying to maintain good relations with its powerful neighbor while not angering Americans.
The U.S. has accused Iranians of providing money and weapons to Shiite militias in Iraq. Tehran denies the charges and argues that the presence of U.S. troops is destabilizing the region.
The two nations have held three rounds of talks on Iraqi security since May, and al-Maliki said he would push for these talks to continue at an ambassador level.
State television said he was received in Tehran by First Vice-President Parviz Davoodi and would hold talks with other Iranian leaders during his visit, expected to last three days.
"We are here today to boost commercial and security relations with neighboring countries against the terrorism challenges in the area," al-Maliki told The Associated Press on the plane to Iran.
The premier, who is a Shiite and is deemed a close ally of Iran's Shiite regime, said he would also discuss and sign a number of cooperation memorandums with Tehran. He did not elaborate.
In an apparent gesture of welcome, Iran's Payam state radio played Arab-style belly dancing music early Wednesday, a rare event in this conservative Islamic country.
In other developments:
Turkey has threatened to stage a military incursion into northern Iraq unless Iraq or the United States cracks down on rebels from the separatist Kurdistan Workers Party, or PKK. The envisaged counterterrorism agreement is aimed at forcing Iraq to officially commit itself to fighting the rebels.
"We have reached an agreement to spend all efforts to end the presence of the Kurdistan Workers Party or PKK in Iraq," Turkish Prime Minister Recep Tayyip Erdogan told a news conference Tuesday with his Iraqi counterpart.
Erdogan said the leaders signed a memorandum of understanding and agreed to speed up work to finalize a counterterrorism pact.
Iraq's cooperation could possibly avert a Turkish incursion, which is opposed by Washington. The United States says the PKK is a terrorist group, but U.S. forces are consumed by chaos elsewhere in Iraq and want to preserve the Kurdish-dominated north as a rare spot of relative stability.
Al-Maliki's already shaky government has been hit with a series of Cabinet desertions by both Shiite and Sunni Arabs, although the Kurdish portion of his coalition has held fast so far. But some members are questioning their participation, and the prime minister may be wary of angering the Kurds.
While reaching agreement on Kurdish rebels, al-Maliki refused to sign the counterterrorism agreement requested by the Turkish authorities. He said it was not in his power to commit Baghdad to the deal without first putting it before parliament and his Cabinet, an Iraqi government official said.
The Turkish and Iraqi Interior Ministries had been negotiating such a pact, but the official said al-Maliki was caught off-guard when asked to sign an agreement Tuesday.
The official said al-Maliki refused to sign the anti-terrorism pact because of Kurdish objections to a description of the PKK as a terrorist organization.
The Kurds told al-Maliki that such language would give the Turks a pretext to invade, according to the official.
However, al-Maliki promised to cooperate with Turkey in combatting Kurdish rebels.
"We in Iraq are victims of terrorism. We understand what Turkey wants," al-Maliki said. "We have said that we will establish cooperation against all terrorist organizations, prominently against the PKK."
The PKK, which has had bases in northern Iraq for decades, has killed tens of thousands in Turkey since taking up arms for autonomy in 1984.