Saudi Arabia has fought hard to tackle Islamist extremism since a series of attacks by Al-Qaeda across the kingdom in 2003 brought a full-scale insurgency perilously close.
Al-Qaeda was eventually brought under control and since 2004 there have been few attacks carried out on Saudi Arabian soil due to the extreme diligence of the security services and the ruling elite.
Despite a sharp increase in terrorist activity in Saudi Arabia in the past year, Al-Qaeda has seen its influence weaken.
Today, the threat to peace is instead being drawn along sectarian lines with two attacks on the kingdoms Shia community in the Eastern Province by terrorists affiliated to the Islamic State of Iraq & Syria (Isis) in late May and early June. Not all of the attacks have been against Shias. Westerners have also been targeted, with shootings of Danish and Canadian citizens in late 2014.
Saudi Arabia is a huge country, but it has a strong central government as well as well-funded civil defence forces. Isis will never be able to grow as quickly and effectively as it has done in Syria, Northern Iraq and Libya.
Crown Prince Mohammed bin Naif is also the kingdoms interior minister and has long been considered the scourge of domestic terrorism; the official has himself been targeted several times in the past.
Some of the crown princes initiatives have been forward thinking and aimed at rehabilitating young men who have been brainwashed by Islamic fundamentalism. However, it is estimated that about 33 per cent of those who went through his rehabilitation programmes continued to engage in terrorist activities afterwards.
According to the Interior Ministry, an estimated 2,275 Saudis have left the country to join Isis in Syria and 635 have since returned. Many of these are now in Saudi jails, leading to the accusation that prison is radicalising them further.
Support for Isis among young Saudis is not believed to be that strong, despite Wahhabism, the strain of Salafi Islam encouraged by the state, sharing the same foundations of belief.
However, Isis has proved to be adept at capturing the imagination of young people from across the world through its social media campaigns and videos posted online, so there is a chance that greater exposure could lead to more recruits.
Riyadh is aware of this and is taking all necessary steps to ensure that Isis does not get any foothold that it can turn into any type of threatening insurgency.
King Salman bin Abdulaziz al-Saud has surrounded himself with the younger generation of royals and they all seem to be keen to establish themselves as a coherent and decisive ruling elite, capable of tackling any external or internal threat.
If this means taking a more hawkish stance against Tehran, while brutally supressing any threat in the kingdom, then this is what they are prepared to do.
The problem with this type of aggressive posturing is that it can only be achieved by over-compensating. This brings the real threat of mass arrests as well as pushing Iran into a sectarian war across the whole of the Middle East.
Inflaming tensions that radicalise Saudis as well as confronting Iran on the battlefield would provide the perfect scenario for Isis to thrive.