The British man who killed four people in a rampage in London last week had made three trips to Saudi Arabia in his lifetime.

Though millions of foreigners from around the world live and work in the kingdom, Khalid Masood’s time there immediately raised questions about whether the country’s ultraconservative brand of Islam impacted his worldview and radicalized him.

The answer is not so simple. Before he stabbed a police officer to death and rammed his vehicle into people on the famed Westminster bridge March 22, Masood had been convicted twice of violent crimes involving knife attacks. As with so many other terror attacks across the world, investigators are trying to piece together how the apparent convert to Islam, who was athletic and popular in high school, became radicalized.

Some suggest it may have been the 52-year-old’s lengthy stints in prison in the UK that had the greatest impact on him. Investigators are also trying to determine who Masood associated with in Saudi Arabia and whether his time there set him on his future path.

The path to radicalization is often mined with a complicated mix of personal failures, a deep sense of discrimination, mental health problems and a superficial understanding of religion. Some are moved too by slick propaganda efforts that capitalize on this combustible combination.

The Islamic State group was quick to claim Masood as “a soldier of the caliphate” but it was unclear whether he had any direct contact with the extremist group or if he was even inspired by their violent ideology.

For now, there are no clear answers.

With so many possible motives and reasons, here’s a look at why Masood’s time in Saudi Arabia has sparked attention:

———

THE SAUDI CONNECTION

Masood spent two years in Saudi Arabia between 2005 and 2006, and between 2008 and 2009. The Saudi Embassy in London says he worked as an English teacher. His last and most recent visit appears to have been in March 2015, when he obtained an “Umra” visa to perform an Islamic pilgrimage to Mecca, as millions of Muslims do annually.

Though Saudi Arabia quickly condemned the London attack, some people believe that prominent Saudi officials were behind one of the world’s most stunning acts of terrorism — the Sept. 11 attacks.

Under new legislation, U.S. family members of those killed on 9/11 are gearing up to sue Saudi Arabia for the attacks. They point out that 15 of the 19 Sept. 11 hijackers were Saudi citizens, as was al-Qaida’s late founder Osama bin Laden — though the Saudi government stripped him of his citizenship in 1994.

———

IS SAUDI ARABIA A HOTBED OF EXTREMISM?

The answer depends on who you ask.

A decade after the 9/11 attacks, clerics across the Arabian Peninsula encouraged young men to join in jihad in Syria.

Though the government made it illegal to encourage fighting abroad in 2014, many Saudi clerics continue to use the pulpit to spread an ultraconservative doctrine known as Wahhabism, which holds a dim view of non-Muslims and regards Shiite Muslims as apostates. The kingdom actively exports this worldview by building and funding mosques and religious schools across the globe.

Additionally, across the Gulf, private funding for extremist groups and jihadi fighters continues despite official efforts to stem the flow.

However, extremist groups such as al-Qaida and IS perceive the Saudi government as an enemy of Islam that is too closely aligned with the West. The Islamic State group has killed dozens of Saudi citizens and police throughout the kingdom since 2014, and the country weathered a wave of al-Qaida bombings, shootings and kidnappings from 2003-2006. The country’s Crown Prince Mohammed bin Nayef, who also serves as interior minister overseeing police, survived a suicide bombing by al-Qaida intended to kill him.

Sceptics of the kingdom point to the case of Tashfeen Malik, who along with her husband Syed Rizwan Farook carried out the December 2015 shootings in San Bernardino, California that killed 14 people. Malik had traveled to Saudi Arabia, where her father has been a resident since the 1980s. Friends say she became more conservative after her time in the kingdom.

Saudi authorities say there is no indication Malik was radicalized there.

———

HOW HAS SAUDI ARABIA DEALT WITH TERRORISM POST 9/11?

The country has created a groundbreaking program, which rehabilitates extremists through months of indoctrination by moderate Islamic clerics, sociologists and psychologists. It claims a success rate of around 87 percent.

Saudi Arabia has also helped establish and fund the United Nations Counter-Terrorism Center, contributing more than $100 million to help finance it. The kingdom also announced in late 2015 a new military coalition of 34 Muslim majority countries to fight terrorism in the region.

The country has arrested more than 3,000 terror suspects since 2015 and is part of the U.S.-led coalition bombing IS group targets in Syria.

Saudi Arabia and the U.S. also share intelligence on extremist groups. Under President Donald Trump, CIA Director Michael Pompeo awarded Crown Prince Mohammed with a medal for his intelligence-related counterterrorism work in February.