Six suicide bombers armed with light weapons clash with security forces before donating explosives.

A group of attackers armed with suicide vests and light weapons killed at least six people southwest of Baghdad on Monday, local officials said.

The attack claimed by the Islamic State of Iraq and the Levant (ISIL) group in Ain al-Tamer, involved six suicide bombers, some of whom may have been killed by security forces before they could blow themselves up.

Masum al-Tamimi, a member of the Karbala provincial council, said that the six attackers tried to infiltrate Ain al-Tamer village early in the morning.

But they clashed with security forces before withdrawing to the Al-Jihad area and detonating explosives there, Tamimi said, putting the death toll at eight.

The interior ministry issued a statement on the attack, saying that five of the bombers were killed by security forces while the sixth detonated explosives inside a house. The ministry put the death toll at six.

Al Jazeera‘s Mohammed Jamjoom, reporting from Erbil, said the attackers were dressed as pilgrims trying to pass the checkpoint to enter the village.

“The policemen were suspicious of these bombers when they tried to enter the checkpoint. They detonated their explosive once the policemen opened fire at them,” our correspondent said.

“The attack just underlines how volatile Iraq is and not just Mosul but other parts of the country as well where ISIL is regularly carrying out attacks.”

READ MORE: How will Mosul rise from the ashes of battle?

Attacks in southern Iraq are rare, especially compared with the frequent bombings that hit Baghdad.

But Ain al-Tamer, which is 50km from the Shia holy city of Karbala, is on the edge of Anbar province, which has long been a haven for al-Qaeda in Iraq and now ISIL.

A similar attack involving fighters armed with explosives, rifles and grenades hit Ain al-Tamer in late August, killing 18 people and wounding at least 26.

ISIL issued a statement claiming responsibility for that attack.

The group overran large areas north and west of Baghdad in 2014, but Iraqi forces backed by US-led air strikes have since regained much of the territory.

Iraqi forces are now fighting to retake the northern city of Mosul, the last major population centre held by ISIL in the country.

But ISIL-linked fighters have still been able to strike inside government-held territory with bombings and other attacks even as they lose ground.