BAGHDAD, Iraq (CNN) -- Clashes between Shiite militias left dozens of people dead and hundreds wounded in Karbala and Baghdad, prompting Shiite Muslim cleric Muqtada al-Sadr on Tuesday to call for calm, his spokesman said.
Iraqi special forces patrol Karbala on Monday as thousands of Shiite pilgrims stream into the holy city.
A curfew and weapons ban were in effect and Shiite pilgrims were evacuated from the southern Iraqi city of Karbala, where fighting has killed up to 50 people and wounded 247 others, the Iraqi Interior Ministry said.
The Iraqi Army had taken control of the city by early Wednesday, Iraq's national security adviser said.
"The situation is quiet now, but nervous and tense," Mowaffaq al-Rubaie said in a phone call from Karbala.
Referring to the clashes in Karbala and Baghdad, he said, "They are potentially dangerous and can develop into something more serious."
The violence erupted Monday night in Karbala, where hundreds of thousands of pilgrims were attending a Shiite religious festival. The fighting spread to Baghdad on Tuesday. Watch how the fighting began »
Five people were killed in Baghdad, where al-Sadr's followers torched six offices belonging to the Supreme Islamic Council of Iraq, authorities said.
Al-Sadr has called for calm, banned further fighting and urged members of the Mehdi Army militia to guard the Islamic Council offices and officials, according to Sheikh Ahmed al-Shibani, a senior al-Sadr aide in Najaf. Al-Sadr also called for an investigation into the clashes and for those behind the attacks to be punished, his spokesman said.
The attacks were accompanied by fighting between the Badr Organization and the Mehdi Army. The Badr Organization, part of the Supreme Islamic Council of Iraq, has been incorporated into Iraqi security forces throughout the country. The Mehdi Army is the militia of al-Sadr.
In Sadr City, where two of the political offices were burned, the Iraqi army called in reinforcements and air support while battling the Mehdi Army, an Interior Ministry official said.
The Mehdi Army also set fire to the Dawa Party's office in Kadhimiya, an Interior Ministry official said. Prime Minister Nuri Al-Maliki is a member of the Dawa Party.
Shiite pilgrims in Karbala were celebrating Sha'abaniya, the birthday of Imam al-Mehdi, the 12th Imam, whom Shiites revere. The celebrations were to peak Tuesday and Wednesday.
The pilgrims in Karbala were evacuated from the city center, and a full curfew was imposed, said Brig. Gen. Abdul Kareem Khalaf, an Interior Ministry spokesman.
There is also a ban on bicycles, motorbikes and pushcarts.
A curfew also was in effect in nearby Najaf, a Shiite holy city to which many pilgrims fled after the Karbala fighting began, Najaf police said.
The fighting was apparently spurred by a security measure that banned people from carrying weapons into Karbala, an Interior Ministry official said. The al-Sadr loyalists refused to give up their guns, leading to clashes between the Sadrist fighters and security forces protecting the shrines, an Interior Ministry official said.
The Mehdi fighters have accused the security forces of being members of the Badr Organization.
Pilgrims and members of the security forces are among the casualties. Local officials convened Tuesday to discuss how to defuse the situation.
Tensions have been high between the armed wings of the major Shiite political movements. Targeted assassinations and battles between the Badr Organization and Mehdi Army have been prevalent in recent months.
• A deputy oil minister and four other kidnapped employees of the Iraqi Oil Ministry were freed Tuesday after two weeks in captivity, the oil ministry said. The deputy oil minister, Abdul Jabber al-Wagga, and the four general managers are in good health and have returned home, the ministry said.
• Several hundred U.S. and Iraqi troops converged on Iraq's Diyala province, killing 33 insurgents and restoring a city's water service, the U.S. military said. The troops carried out an air assault Monday in the Gobia community to restore water in nearby Khalis. The military said "water is currently flowing unimpeded."
• A suicide bomber detonated an explosive vest Monday in the courtyard of a mosque in Falluja, killing 12 people, including an imam known for speaking out against Iraqi militants, an Interior Ministry official said. Two of his sons also were killed in the blast, according to the official.
• Coalition forces "killed eight terrorists and detained 11 suspected terrorists" during raids targeting al Qaeda in Iraq leaders, the military said Tuesday. The raids, spanning two provinces northeast of Tikrit, targeted a senior-level adviser with links to international terrorist Khalid al-Turki, the military said. Al-Turki was killed during a June 23 operation.
• A "highly sought weapons facilitator" was arrested Tuesday in Baghdad, the military said. The individual is suspected of distributing bombs and smuggling weapons from Iran to Iraq, the military said. E-mail to a friend
CNN's Yousif Bassil and Jomana Karadsheh contributed to this report.