BAGHDAD - More than 1 million pilgrims were ordered to leave the Shiite holy city of Karbala on Tuesday and police imposed a curfew after two days of violence -- including raging gunbattles between rival militias -- claimed at least 35 lives during a religious festival.

Nearly 200 people were wounded, security officials said, and the government sent reinforcements from Baghdad to quell growing unrest and help clear the city.

Security officials told The Associated Press that Mahdi Army gunmen, loyalists of radical cleric Muqtada al-Sadr, attacked guards around the two Karbala shrines that were under the protection of the Badr Brigade, the armed wing of the Supreme Islamic Iraqi Council.

In telephone calls to reporters in Karbala, gunfire and exploding mortar shells could be heard.

The security officials, who demanded anonymity for security reasons, said at least 180 people have been wounded. They include women and children.

Interior Ministry spokesman Maj. Gen. Abdul-Karim Khalaf said "entrances and exits to Karbala have been secured and more forces are on the way from other provinces," including Baghdad. The other officials said buses had been dispatched to Karbala to take pilgrims out of the city.

Gunshots rang out Tuesday in the area near the Shiite shrines which are the focal point of celebrations marking the birthday of the 12th and last Shiite imam, who disappeared in the 9th century. The festival was to have reached its high point Tuesday night and Wednesday morning.

Thirty of the dead were killed in Tuesday's fighting, five others died in an outbreak of violence Monday night pilgrims tried to push past frustratingly slow security checkpoints near the Imam al-Hussein mosque.

He called the gunmen who fought police "criminals," adding that the curfew was imposed because of fears for the pilgrims.

A member of the city council said the center of town was in chaos with pilgrims running in all directions to escape the gunfire. No one, he said, was sure who was doing the shooting. He said a rocket-propelled grenade exploded near the shrine.

"We don't know what's going on," said the councilman, who would not allow use of his name for security reasons. "All we know is the huge numbers of pilgrims was too much for the checkpoints to handle and now there is shooting."

AP Television News pictures from the city, 50 miles south of Baghdad, of the Monday night melee showed pilgrims running helter-skelter as gunfire, apparently police shooting into the air, rang out in the streets near the mosque.

North of Baghdad, hundreds of U.S. and Iraqi forces backed by helicopters and jet fighters killed 33 Sunni insurgents who were holding back the water supply to the Shiite town of Khalis, the American command said in a statement Tuesday.

The assault began before dawn on Monday when a joint force was landed by helicopter in the village of Gubbiya, 10 miles east of Khalis. The assault force killed 13 fighters and attack aircraft killed 20 others, the military said. The area is known to be controlled by al-Qaida in Iraq. Khalis, 50 miles north of Baghdad, has been the scene of repeated Sunni insurgent bombings and mortar attacks.

"The objective of the mission was to open the spillway, which regulates water flow to the town of Khalis, restoring the essential service of water," the statement said.

The assault uncovered three weapons caches, led to the capture of three men and "water is currently flowing unimpeded to Khalis," the military said. The statement did not say if any U.S. or Iraqi soldiers were killed or wounded.

A Bradley Fighting Vehicle was seen engulfed in flames at the side of the road leading to Baghdad Airport Tuesday morning. The U.S. military said the armored vehicle had suffered an undetermined mechanical fault and none of the crew was hurt.

In Fallujah, the Sunni city 40 miles west of Baghdad, mourners buried 11 victims of a mosque suicide bombing Monday night. Ten people were wounded in the attack which police said targeted an anti-al-Qaida Sunni sheik who had just returned from Syria.

Meanwhile, suspected Sunni gunmen kept up attacks on pilgrims traveling to and from Karbala for the Shabaniyah festival, which marks the birth of Mohammed al-Mahdi, the 12th and last Shiite imam who disappeared in the 9th century. Devout Shiites believe he will return to Earth to restore peace and harmony.

A boy was shot to death and his father was wounded as they drove home from Karbala. Separately, gunmen opened fire randomly on vehicles returning to Baghdad, wounding two pilgrims in a small bus. And a sniper opened fire on pilgrims in southern Baghdad, wounding four. The shootings were reported by local police who refused to give their names because they were not authorized to release the information.