According to Interior Ministry spokesman Brig. Gen Saad Maan, six suicide bombers tried to sneak into Karbala from its western outskirts earlier in the day but security forces detected and killed five of them.
The sixth attacker broke into a house in the city's Ayn al-Tamer neighbourhood, where he detonated his suicide vest, killing six people and wounding another six.
The attack came as hundreds of thousands of faithful Shiites have been walking to Karbala to commemorate the 7th century death of Imam Hussein, Prophet Muhammad's grandson and an iconic Shiite martyr. The city, where Imam Hussein and his brother are buried, is located some 90 kilometres (55 miles) south of Baghdad. On Sunday, pilgrims are expected to converge on the city for the climax of a 40-day mourning period, known as al-Arbaeen.
In an online statement, the Islamic State group claimed responsibility for the attack, saying it targeted "polytheists ... in filthy Karbala." It put the number of the suicide bombers at five, saying they clashed for hours with the security forces and set off their explosives consecutively when they ran out
ammunition.
The militants often exaggerate their claims. The Associated Press could not verify the authenticity of the statement, but it was posted on a militant website commonly used by the extremist group.
Like other Sunni extremist groups, IS considers the Shiites heretics and has frequently targeted Shiite civilians and places of worship.
"We are walking all these long distances, we are not afraid of terrorists, we are not afraid of Daesh," said 56-year-old pilgrim Sattar Hussein, using the Arabic acronym for IS. "We are not afraid of anyone who defames Islam. And especially those who are targeting the al-Arbaeen."
Wearing a black traditional Arab dress, Hussein was among hundreds of pilgrims leaving Baghdad on foot to head to Karbala under tight security measures. Some of the marchers were carrying religious flags, including some with a portrait depicting Imam Hussein, as security forces set up check points to search them.
In southern Iraq's Shiite heartland, Karbala is far from Mosul, where a massive Iraqi military operation -- launched last month and backed by U.S.-led coalition airstrikes and paramilitary militias -- is underway to free the city, Iraq's second-largest, from IS.
On Sunday, a wave of attacks in and around Baghdad killed at least 23 people and wounded 70 others. Many of the assaults targeted Shiite pilgrims walking toward Karbala.
Do you think AAP will perform better in Delhi polls without alliance?