Kamal Yousef remembers exactly what he was doing ten years ago when he heard of the attack on the World Trade Center.
"I was getting ready to leave home, it was shortly before 4pm And my father called out and said there's something happening in New York, come and watch," recalled Yousef, then a 37-year-old software company manager in Riyadh.
He joined his father at the family television. "After half an hour, the second plane came and I was in complete shock," he said. "It took me some time to realise the scope of the human tragedy. I knew I wasn't watching a movie, but what I was watching was almost fictitious. It's not the kind of event you ever expect to see."
Later, as he drove to work and heard about the Pentagon attack, Mr Yousef said, "I thought to myself 'God, I hope no Muslims are involved in this.'"
The fact that 15 of the 19 suicide hijackers who killed nearly 3,000 people on September 11, 2001, including many Muslims, were Saudi, was bound to mean that Saudi Arabia would feel the ramifications of the most lethal terrorist attack ever on the United States.
Over the past decade, those consequences have covered a wide spectrum, from foreign policy to sermons at Friday prayers, and as Mr Yousef puts it, they have been both "far-reaching and conflicting".
The negative consequences came quickly, as Saudis suffered perhaps the harshest backlash of any foreigners from angry Americans. Students, businessmen and vacationers found their once-easy access to the United States shut down as visas became almost impossible to get. Their country was vilified in US newspaper columns; their religion excoriated for encouraging extremist ideas.
The 2003 US invasion of Iraq, which brought war to Saudi borders once again, was another negative repercussion of 9/11.
This was quickly followed by the May 2003 outbreak of Al Qaeda's three-year insurgency in the kingdom that eventually killed 164 people. As Mr Yousef observed, 9/11 "was a contributing factor to what happened here because it emboldened the extremists".
The upshot of both 9/11 and the insurgency was an expansion of the Saudi security establishment and greater monitoring of Saudis in activities ranging from their internet use to their banking transactions.
Greater financial controls aimed at halting the illicit financing of terrorist groups included laws to curb money-laundering, as well as restrictions on collecting charitable donations.
In addition, more than 11,500 people have been detained in the government's counter-terrorist campaign against Al Qaeda in the past decade, according to government figures. About half have been released, most after serving short sentences
"Something is wrong here"
But 9/11 was also beneficial for Saudi Arabia.
The Saudi role in the attacks gave King Abdullah bin Abdul Aziz, who was crown prince in 2001, valuable political capital, according to Robert Lacey, a historian and author of Inside the Kingdom.
The 2001 attacks were "a wake-up call for Saudi Arabia, signalling the end of the appeasement of the radical religious forces that had effectively licensed Al Qaeda," Mr Lacey wrote in an email. They "gave King Abdullah the impetus he needed to embark on the reforms and opening up of society that has characterised the last decade".
The king allowed the media to raise social, economic (but not political) issues for public debate. He encouraged women to enter the workforce and get advanced degrees. He appointed the first-ever female to the Saudi cabinet, fired clerics who undermined his policies and ordered an overhaul of the country's judicial system.
The 2001 attacks and the domestic insurgency also forced Saudis to confront two major, inter-related issues crucial for the kingdom's future: its education system and religious extremism.
Curriculum reforms have given mathematics and science more prominence, religion classes have been streamlined, and aggressive language towards non-Muslims in religious textbooks has been removed. But progress in education reform remains slow because of opposition from conservatives who oppose changes they see being imposed by the West.
Inroads have also been made to combat religious extremism and intolerance, which many critics have pointed to as precursors of Al Qaeda's violent ideology. King Abdullah formally recognised the kingdom's religious diversity by launching a programme of national dialogue among representatives of different strains of Islam.
"We must study what has happened," he told the first dialogue participants in 2003, according to Mr Lacey. "Something serious has gone wrong here, and we must try to put it right."
The king also reached out to leaders of other faiths in 2008 when he hosted a global conference on interfaith dialogue in Madrid.
"Saudi Arabia always was against Al Qaeda, but what we did not do was encourage tolerance within our community, within our society," said Jamal Khashoggi, the former editor of Al Watan and now director of a forthcoming 24-hour all-news satellite television channel being set up by Prince Waleed bin Talal.
Mr Khashoggi said that there has been change since 9/11, but he added: "I think we still need more change ... We need to spread the message of tolerance, the message of humanity."
Fighting "Deviant Thought"
The government has also moved to combat what it calls "deviant thought", holding symposiums in schools, universities, mosques and government institutions on "The Saudi Moderate Approach".
It has also closely examined what youth role models were teaching and preaching. By 2010, more than 2,000 teachers had been removed from the classroom because of their extremist views and another 400 detained, security officials have said. Hundreds of mosque personnel were also removed.
"In many institutions you will see programmes countering this extremist ideology," said Abdulrahman Al Hadlaq, the general director of the Interior Ministry's Ideological Security Directorate. "And I think through these years we have achieved ... very good success."
Mr Yousef noted that one message he had long heard from religious leaders has changed over the past decade. "I listen to Quran radio all the time," he said, and since his teens he had "been led to believe that Muslims should treat non-Muslims with disdain".
But after 9/11, "we were told things we should have been told long ago, for example, about the sanctity of non-Muslim life".
"It was never explained to us."
Since 9/11, he added, he has come to see "that extremist Muslims and Christians are two sides of same coin. As soon as you treat human life with disdain, that's when you fall from grace".
Saudi foreign policy was also affected by 9/11 as it became clear that the 2001 attacks, and the 2003 insurgency, had been carried out by Arab youths who had been encouraged to join the Saudi and US-funded jihad against Soviet troops in Afghanistan.
"The biggest lesson" of the past decade, Mr Al Hadlaq said, is "that mistakes were committed by the international community when they supported the travel of young guys to go and fight in Afghanistan".
As a result, the Saudi government no longer allows its young men to join Islamic fighting groups overseas and has become more discretionary about funding Islamic organisations. In some countries, Saudi donors are developing stronger ties to non-salafi as opposed to salafi groups, according to scholars of the salafi movement.
"They are trying to be closer to mainstream organisations," said the Jakarta-based scholar Noorhaidi Hasan.
Meanwhile, other forces unconnected to 9/11 have changed Saudi Arabia enormously. Most significant is the internet - now accessed by a quarter of the kingdom's 22 million people - and its powerful social media progeny of blogging, Facebook and Twitter.
The access to the world offered by the internet, as well as the appearance of the kingdom's largest-ever generation of young people, have reinforced Saudi Arabia's growing openness.
"I think that before 9/11, talking about religious issues and women driving was a red line and no one dared to talk to about them," said the Al Yamamah University student Saud Al Thonayan.
"But after 9/11, a lot of things opened in Saudi Arabia. We can talk about women's rights, women driving. Even a lot of conservatives will fight you, but the government gives you the opportunity to give your ideas and talk about sensitive issues like 9/11."
Opening up young Saudi minds was a key reason why King Abdullah expanded the government's overseas study programme. There are now more Saudis studying outside the kingdom than at any time in its history - around 100,000. Almost half of them, 47,000 are in the United States.
"I remember how in the 1980s one of my cousins went to the United States to study and I thought he was a genius," said the journalist Abdulaziz Al Rabah, 23. "Now anyone can go to America to study."
All these post-9/11 trends are now feeling the impact of what has been another earthquake for Saudi Arabia, the Arab Spring. It also has brought negative and positive ramifications for the kingdom.
Reform has slowed, and Saudi security is becoming more intense. Around 60,000 new security jobs were created last spring and a proposed new law would reduce the parameters of free speech. The king has ordered the media not to criticise religious scholars who have been given funds to set up more offices around the country.
On the flip side, the Arab Spring has demolished for now the appeal of Al Qaeda, which has far less support among Saudis than a decade ago. With their distinctive cry of "Salmiyah! Salmiyah!" youthful protesters in Tunis and Cairo did more to discredit Al Qaeda's extremist ideology than the killing last May of Osama bin Laden.
"The revolutions of Egypt and Tunisia killed Al Qaeda's concept … of fighting the West because we can't do anything against our bad corrupt regimes," said the Riyadh-based Islamist lawyer and former judge Abdulaziz M Al Gasim. "Now, experience says you can do a lot without fighting the 'overseas enemy'. I see this in hundreds of tweets and messages that the change is easier than we thought … there is a chance for peaceful change."