Islamic State has threatened to destroy Saudi Arabian prisons holding extremists, following Riyadh’s execution of 47 people last week, including prominent Shiite cleric Nimr al-Nimr – a move which led to the diplomatic crisis with Iran.

Although the diplomatic divide now largely seems to be between Shia Iran and the majority of the Sunni world, 43 of the executed prisoners were convicted Al-Qaeda members. Islamic State (IS, ISIS/formerly ISIL) now wants to target the al-Ha’ir and Tarifya prisons – the two facilities where Al-Qaeda and IS suspects are being held, Reuters reports.

READ MORE: ‘A Wahhabi Muslim Brotherhood’: More escalation ahead in Saudi-Iran crisis

The statement, posted in an article on Tuesday, alleges the group seeks to free captives, but has made the calculated decision to burn the prisons to the ground instead – something it says it must do to overthrow the ruling system.

The group has spread its influence beyond its home territory of Syria and Iraq, and a supporter blew himself up outside Ha’ir prison near the Saudi capital in July. And IS itself claimed responsibility for a string of bombing and shooting attacks since November 2014. More than 50 people have lost their lives since, most of them Shiites.

Although IS and Al-Qaeda have had many feuds over the last few years – with shifting allegiances, heated statements and criticism over incorrect ideologies – the two have recently decided to come together to inflict bigger damage on ‘infidels’ both at home and abroad. The two are also united against Saudi Arabia, which has declared them both terrorist groups and imprisoned thousands.

MidEast leaders lash out at Saudi Arabia over #Shiite cleric's execution, protests erupt https://t.co/AsyxbaDwaDpic.twitter.com/pnzvX35Ceh — RT (@RT_com) January 2, 2016

A promise in December to carry out attacks in Saudi Arabia was also given by Al-Qaeda in the Arabian Peninsula (AQAP) – the fiercest branch of the group, originating in Yemen. The threats were made to keep the Saudis from executing their group members.

Adding to the danger of IS are its supporters, as they are harder to detect than traditional elements. Saudi security services believe they may be acting independently of the main structure, but receive help on logistics and other matters.

The same executions that provoked the latest threat from Islamic State also recently drove relations between Saudi Arabia and Iran to a new low, after angry Iranians attacked the Saudi embassy in Tehran.

Iraq announced on Wednesday it will mediate between the two sides.