BAGHDAD — Suspected Shiite militants lobbed rockets and mortar shells into the U.S.-protected Green Zone and a military base elsewhere in Baghdad on Sunday, killing three American troops and wounding 31, officials said. Separately, the U.S. military reported two other American soldiers died Sunday.

The attacks occurred as U.S. and Iraqi forces battled Shiite militants in Sadr City in some of the fiercest fighting since radical cleric Muqtada al-Sadr ordered a cease-fire a week ago. At least 16 Iraqi civilians were killed and nearly 100 wounded in the fighting, according to hospital officials.

A military official said two U.S. troops died and 17 were wounded in the attack on the Green Zone, which houses the U.S. Embassy and the Iraqi government headquarters in central Baghdad.

Another American service member was killed, and 14 were wounded in the attack on a base in the southeastern Baghdad area of Rustamiyah, the official said, speaking on condition of anonymity because he wasn't authorized to release the information.

The U.S. military said separately that an American soldier was killed Sunday in a roadside bombing in the volatile Diyala province north of Baghdad. A U.S. soldier assigned to the division operating south of the capital also died Sunday from noncombat related injuries, according to a statement.

The deaths raised to at least 4,018 members of the U.S. military who have died since the Iraq war started in March 2003, according to an Associated Press count.

A senior U.S. military official, also declining to be identified for the same reason, said the rockets were fired at the Green Zone from Sadr City, while the mortar shells came from another predominantly Shiite neighborhood in eastern Baghdad, New Baghdad.

U.S. commanders have blamed what they call Iranian-backed rogue militia groups for launching missiles against American forces.

The strikes occurred despite a strong push by the U.S. military to prevent militants from using suspected launching sites on the southern edge of Sadr City, the Baghdad stronghold of the Mahdi Army of anti-U.S. cleric Muqtada al-Sadr.

Fierce fighting erupted in Sadr City earlier Sunday after Iraqi troops backed by U.S. soldiers and attack helicopters tried to advance deeper into the enclave of some 2.5 million people.

American helicopters also fired Hellfire missiles that destroyed a vehicle and killed nine militants who were attacking Iraqi security forces with rocket-propelled grenades in the area, the military said in a statement.

The surge in violence came as tensions rose in Shiite areas despite al-Sadr's cease-fire order issued March 30 that eased nearly a week of clashes in Baghdad, Basra and other cities in the Shiite south. The cleric stopped short of asking his fighters to surrender their weapons, and sporadic clashes have continued.

The inability of the Iraqi security forces to curb the militias has cast doubt on their ability to take over their own security two days before the top American officials in Iraq — Gen. David Petraeus and Ambassador Ryan Crocker — are to brief Congress on the prospects for further reductions in the U.S. troop presence in Iraq.

Al-Sadr has called for a "million-strong" anti-U.S. demonstration on Wednesday in Baghdad to protest the fifth anniversary of the capture of the Iraqi capital by invading U.S. troops.

At the edge of Sadr City, Lt. Col. Dan Barnett, the commander of the 1st Squadron, 2nd Stryker Cavalry Regiment, said Iraqi forces had come under sustained fire overnight after establishing checkpoints deeper into the Shiite district.

"They're working to establish control," he said, speaking to a small group of reporters as heavy gunfire resounded outside a joint U.S.-Iraqi base.

Mortar shells also fell on a popular commercial area in the Jamila neighborhood, setting a fire that burned some 100 shops, according to the Baghdad military command. It said fire fighters came under heavy gunfire that slowed their efforts to extinguish the flames.

A local fire official, who declined to be identified because he wasn't supposed to discuss the issue, said the mortars had been aimed at a U.S.-occupied police station but fell short. That report could not be independently verified.

Last week, Prime Minister Nouri al-Maliki, himself a Shiite, ordered a nationwide freeze on Iraqi raids against Shiite militants, bowing to demands by al-Sadr who had hinted at retaliation if Iraqi security forces continue to arrest his followers.

U.S. commanders said they will fight back to maintain control of a swath of territory on the southern edge of Sadr City that has been used as a launching site for rockets aimed at the Green Zone, which has come under steady fire since the current tensions began.

"Where we have criminal elements that are threatening the security and peace of the people of Iraq, we take action," said Maj. Gen. Jeffery Hammond, the top commander of U.S. forces in Baghdad.

The Iraqi government has relaxed security measures Saturday around the Mahdi Army strongholds of Sadr City and the Shula neighborhood, allowing trucks carrying maintenance teams, food, oil products and ambulances into the areas that still face a vehicle ban despite the lifting of a citywide curfew.

But residents continued to complain of hardships.

"Our situation is miserable. We lack food, water and electricity. This morning I saw two men being shot by a sniper as they were trying to cross the street near my house. The government should do something to end our suffering," said Hussein Khazim, a taxi driver who has been out of work since the turmoil erupted in late March.

Separately, the U.S. military said the largest cache of armor-piercing roadside bombs known as explosively formed penetrators, or EFPs, had been found by Iraqi troops acting on a tip south of Baghdad.

More than 1,000 bomb components and 3,000 pounds of explosives were found Wednesday in a 6-ton truck in a garage south of Hillah, according to a statement.

American commanders say Iran supplies Shiite militias with the EFPs and other weapons. Tehran denies the allegations.

Violence also continued in northern Iraq. Gunmen seized 42 students off a bus near the city of Mosul — the last major urban stronghold of al-Qaida in Iraq — but later released them unharmed. The U.S. military said the college students were rescued by Iraqi soldiers, and three kidnappers had been detained.

Also Sunday, hundreds of mourners gathered in the capital's Karradah district for the funeral of Father Youssef Adel, an Assyrian Orthodox priest slain the day before at his home.

One of the mourners, Midhat Faez, said the assassination was aimed at provoking conflict between Muslims and the tiny Christian community.

"As Christians, we are terrified and our numbers are gradually diminishing," Faez said.