Iraqi military has discovered mass graves of 500 people in the vicinity of an ISIS prison near the northern city of Mosul.

The Media Cell Security Investigation team said on Friday that one mass grave near the Badoush Prison contained the bodies of 470 prisoners killed by ISIS terrorists, while another contained the bodies of 30 people.

The majority of the victims were presumably Shia Muslims or were from other minority groups in the city, said a security official who spoke on the condition of anonymity.

This is not the first time ISIS targets Shia Muslims in Iraq and other countries. On Friday, ISIS terrorists in Afghanistan carried out an attack on the Imam Zaman Mosque, where Shia Muslim worshippers were attending Friday prayers.

Human Rights Watch (HRW) has reported that the group had executed possibly hundreds of detainees in Mosul and buried them in a mass grave.

According to witnesses, the victims were executed between June 2014 and May or June 2015 and their bodies were dumped in a sinkhole at a site in western Mosul.

Several members of Iraqi security forces were also among the victims.

According to Lama Fakih, the HRW deputy Middle East director, terrorists had also laid landmines and booby-traps in the mass grave in an attempt to “maximize harm to Iraqis”.