Al-Sadr's forces are vying with the SIIC for power in regions south of the Iraqi capital, Baghdad.
A ministry official said the dead had been killed in gun fights between security forces and militiamen.
The official, who would not be named, said the government was sending buses to Karbala to take pilgrims out of the city.
Pilgrims have been walking to the shrines but gunfire was heard on Monday night and into Tuesday as thousands congregated to mark the birthday of the 12th and last Shia imam.
The festival was to have reached its high point on Tuesday night and Wednesday morning. Pilgrims had earlier complained about the level of security - which they said was so high it made movement frustratingly slow near the Imam al-Hussein mosque.
Security was high as pilgrims have been killed in previous years by suicide bombers.
Major-General Abdul-Karim Khalaf, a spokesman for the interior ministry, said Nuri al-Maliki, the prime minister, had dispatched more troops to the area from Baghdad and the surrounding areas.
He described the gun men as "criminals" adding that the curfew was imposed because of fears for the large mass of pilgrims.
"The situation now is under control, but what is worrying is that the pilgrims are in huge numbers," he said.
"The area where they were gathering has been evacuated in order to control those (criminals)."
He said the gunmen were gathering in three areas in the old town and security forces were chasing them.