BAGHDAD - Iraq on Monday executed 42 Sunni Muslim militants convicted on terrorism charges ranging from killing members of security forces to detonating car bombs.

The biggest mass execution this year in Iraq came after the government came after Sunni suicide attacks killed at least 60 people near the southern city of Nassiriya, a Shi'ite area, on Sept. 14, prompting Shi'ite demands for tougher judicial action.

The Justice Ministry said on Sunday the 42 had been hanged at a prison in Nassiriya, three months after 14 other militants were executed following convictions for terrorism.

Islamic State claimed responsibility for three suicide attacks targeting restaurants and a security checkpoint near Nassiriya. Relatives of victims were invited to witness Sunday's executions, the justice ministry said.

"Despite all the pain inside me after losing my two brothers in the suicide attacks, when I saw the terrorists dangling from the rope I felt relief," said Fadhil Abdul Ameer from Nassiriya.

Islamic State's self-declared caliphate, declared in 2014 after it captured wide areas of northern and western Iraq, effectively collapsed in July when U.S.-backed Iraqi forces captured Mosul, the group's de facto capital in Iraq.

But recent deadly bomb attacks in Baghdad and other cities show the jihadists remain capable of guerrilla-style warfare, a tactical shift away from seeking territorial conquest.

(Reporting by Ahmed Rasheed; editing by Mark Heinrich) ((ahmed.rasheed@thomsonreuters.com; +964-7901-947-131; Reuters Messaging: ahmed.rasheed.thomsonreuters.com@thomsonreuters.net))