Saudi Arabia remains the only state recognised by the international community that came into existence as the direct result of armed expansion by Islamic radicals.
The Kingdom was founded in 1932 after nearly two centuries of sporadic conquest by the House of Saud and the followers of Mohammed ibn Abd al-Wahhab, the 18th century Sunni cleric who wanted to purify Islam and restore the values of the early followers of the prophet Mohammed.
The Saudi-Wahhabi alliance founded two states in the 18th and 19th centuries, only to lose control of the Arabian peninsula, before declaring the modern Saudi state following a string of military conquests from 1902 to 1932.
The first Saudi king, Ibn Saud, was backed by Britain for much of this period.
Saudi Arabia expert Professor Madawi Al-Rasheed from the LSE told us: “It was a jihadi project. If you look at the model of state formation you find similarities (with IS).
“You’ve got a religious movement with a puritanical, literal interpretation of Islam, and it believes that everybody else is not a good Muslim, and takes it upon itself to Islamise other people. That’s what happened in Saudi Arabia three times.
“There is an element of jihad in it and of force, of predatory military expansion.”
Early Wahhabi raids, like the sack of the Iraqi city of Karbala in 1802, saw massacres of civilians and the destruction of Shia holy sites, recalling the atrocities of the Islamic State group.
And like IS, al-Wahhab was more tolerant of Christians and other non-Muslims than of co-religionists who he deemed to have strayed from his purist interpretation of Islam.
Nevertheless, important philosophical differences between IS and the modern Saudi state have emerged.
IS want to establish a Caliphate under a supreme religious leader, and regard all other forms of government including monarchies and democracies as un-Islamic.
Ibn Saud flirted with Islamic titles like emir, but eventually gave himself the western-style title of king. Saudi rulers never dared to claim the office of Caliph – the leader of all the Muslims – despite taking over the holy cities of Mecca and Medina in the 1920s.
The House of Saud has a complex relationship with Saudi Arabia’s hard-line Wahhabi clerics, giving scholars a prominent position in the moral and political life of the Kingdom, but arresting those who appear to challenge its authority.
IS leader Abu Bakr al-Baghdadi wants the “caliphate” to expand its borders and attack infidels in foreign countries, whereas the early Saudi fondness for cross-border raids soon changed.
Ibn Saud signed his first treaty with the British in 1915.
By the early 1920s, he was cracking down on Wahhabi fighters when they attacked neighbouring British protectorates, and the kingdom he founded has mostly striven to maintain good relations with key allies like Britain and the US since then.
And while the modern Saudi state is often accused of discriminating against the country’s Shia minority, IS is considerably more extreme in its sectarianism, massacring Shia civilians and attacking mosques.
Punishment and execution
IS has published a document setting out what punishments “citizens” can expect if they transgress its strict interpretation of sharia law.
A number of the penalties are identical to those in Saudi law – not surprisingly, since the kingdom also bases its penal code on the sharia.
Both IS and Saudi rules call for the death penalty for those convicted in religious courts of blasphemy, adultery and homosexuality, among other offences.
Thieves also face the prospect of having a hand amputated both in IS territory and in Saudi Arabia, while public lashings are prescribed for lesser offences.
The IS document specifies the method of execution for certain crimes: stoning for adultery, crucifixion – as a method of displaying the body rather than killing the victim – for murder and robbery.
While most people executed in Saudi Arabia are beheaded by a sworsdman, cases of stoning and crucifixion have also been reported.
Amnesty International estimated last month that the Saudis had executed 151 people so far this year.
That could technically mean that there have been more beheadings in the kingdom than in territory controlled by IS, although the terror group is certain to have killed thousands of civilians using a horrific variety of other methods.
As well as shooting captives, IS fighters have crushed their victims with tanks, burned them in cages, thrown them from rooftops and buried them alive, according to video footage and eyewitness testimony.
It seems at first glance like the Saudis execute people for a wider variety of crimes than IS, with killings regularly ordered for dubious offences like witchcraft and sorcery.
These “crimes” are not mentioned in the jihadi document, but IS were reported to have beheaded people for sorcery for the first time in June this year, suggesting that the penal code does not tell the whole story about the group’s views on law and order.
It appears that there is at least one area where IS go further than the Saudis in their interpretation of Sharia.
When Wahhabi forces seized Mecca in 1925, they immediately banned the smoking of cigarettes. But the ban proved to be unenforceable and was soon dropped.
But according to widespread reports, people in IS-run cities are still threatened with flogging and worse if they are caught smoking.
Arguably, it’s unfair to compare the legal system of a sovereign state with the summary punishments meted out by IS’s rudimentary judiciary.
Human rights groups frequently criticise Saudi justice. The latest report on the country by Human Rights Watch talks of the lack of a “formal penal code” and alleges “systematic violations of due process and fair trial rights”.
Saudi Arabia robustly defends its legal system, with a justice ministry spokesman quoted as saying: “Questioning the fairness of the courts is to question the justice of the Kingdom and its judicial system based on Islamic law, which guarantees rights and ensures human dignity.”
Status of women
Human rights organisations have also long criticised Saudi Arabia for laws restricting the lives of women.
A strict dress code is enforced and women cannot travel or work without the permission of a male “guardian”. Most social activities are strictly segregated.
But there has been some minor relaxation of the rules in recent years. The first co-educational university opened in 2009. Earlier this year women were allowed to vote for the first time, in municipal elections. And some restrictions on women working have been lifted.
These mild reforms appear to have enraged IS, whose spiritual leaders describe their views on the place of women in the Islamic State in a manifesto recently translated and published by the Quilliam Foundation.
It complains: “The Saudi tyrants, one after another, have taken up the reins of the Westernisation of women such that they cannot fulfil their duties. Thus female dignity has been obliterated and restlessness has begun to take shape in gatherings of people regarding this worsening situation.
“Currently, women are able to work alongside men in shops like banks, where they are not separated by even a thin sheet of paper. They are allowed to appear in ID photographs and those who do not possess ID cards find many things difficult.
“The door for Western scholarships is wide open and a university of corruption was even opened in Jeddah – may God cause it and its people to sink into the Earth. Its doors are for males and females who are able to mingle in the hallways as if they were in an infidel country in Europe.”
Oddly though, IS may be more relaxed about one aspect of women’s lives: driving. Saudi women are not specifically forbidden from driving but in practice, their applications for licences are turned down.
According to unverified reports, IS are more relaxed about women getting behind the wheel, arguing that there is nothing in Islamic law that forbids it.
Destruction of historic sites
IS militants have destroyed scores of Muslim tombs, shrines and holy places in Iraq and Syria.
This seems squarely in the Wahhabi tradition. And similarly, the Saudi authorities have bulldozed tombs and buildings associated with the prophet and his relatives and companions in Mecca and elsewhere, in keeping with al-Wahhab’s belief that holy places encourage idol worship and heresy.
But IS have gone further, gleefully vandalising the ancient ruins of pre-Islamic cultures and blowing up Christian churches.
The Saudi philosophy on this is more complicated.
Some pre-Islamic archaeological sites in the kingdom have been preserved. The 2,000-year-old settlement of Madain Saleh became the country’s first Unesco World Heritage Site in 2008 and has been developed as a tourist attraction.
But there are limits to this liberalism. Freedom of religion for non-Muslims is severely curtailed in Saudi Arabia. Converting from Islam to other religions is punishable by death.
In 2012 the country’s leading cleric, the Grand Mufti, said all Christian churches in the Arabian peninsula should be burned. There are no churches (or synagogues) to burn in Saudi Arabia because they are not allowed to exist in the first place.
Arguably, there are a number of similarities between the Saudi state and the so-called “caliphate”, which reflect their shared Wahhabi heritage.
Both have similar historical origins, favour harsh punishments based on Sharia law, are intolerant of other religions and variants of Islam, and demand the segregation of the sexes.
But there are big differences too. Despite the complex influence of religious scholars on Saudi life, the country is a monarchy not a theocracy.
And unlike IS, the rulers of Saudi Arabia have long favoured alliances with western powers, notably Britain.
Today, the Saudi ambassador to London, Mohammed bin Nawaf Al Saud, wrote an article in the Times rejecting suggestions that his country supports extremism, saying: “These accusations are lobbed at Saudi Arabia on a daily basis; they are not helpful to anyone except the extremists who thrive on our division.”