Seifeddine Yacoubi Tunisia Isis
Seifeddine Yacoubi shot and killed 38 people, mostly Britons, before being killed in Sousse, TunisiaFacebook

As the world reels from Friday's terror attack in the Tunisian holiday resort of Sousse that left 39 mostly British tourists dead, questions are emerging of what transformed Real Madrid and breakdancing fan Seifedinne Rezgui into a terrorist killer.

Looking like any other tourist in dark shorts and a T-shirt, eyewitnesses described how Rezgui drew a Kalashnikov machine gun from a parasol on the beach in the popular holiday resort and gunned down tourists before being shot dead by police.

In a statement, Islamic State (Isis) claimed responsibility for the attack, and released a picture showing Rezgui under the pseudonym Abu Yahya al-Qayrawani posing with assault rifles.

Neighbours of the aviation student's family in his hometown of Gaafour, about 100 miles from Sousse, described their shock at Rezgui's actions.

"He was good, good, good!" neighbour and family friend, Monia Riahi, 50, told the Guardian. "I've known him since he was small. He was never in trouble with anyone ever. Maybe he was brainwashed or something."

Rezgui's parents have both been taken in for questioning by police in the Tunisian capital, as security forces investigated the seemingly normal engineering student's path to radicalisation.

"We were all shocked when we heard the news and saw his picture, and his mother was devastated," added his uncle, Ali Al-Rezgui, speaking to The Telegraph.

"Yes, he went to mosque and prayed, but just like the other young men, he would then go to a cafe and play football with his friends. I last saw him on Thursday, he said 'hello', and then he left that night and went to his friend's house. We didn't know where he was going, and there were no goodbye's. The entire family is shocked at the hidden reality of what he was capable of."

Isis: The Islamic State's first year in 60 secondsIBTimes UK

Unemployment in Gaafour is high, after local zinc and lead mines closed in 1993, and the Rezgui family experienced tragedy when Seifeddine's younger brother was killed by a lightning strike aged 14, both possible factors in Rezgui's transformation into a murderer who reportedly laughed as he embarked on his killing spree.

With Rezgui never having travelled abroad and not known to Tunisian security forces, attention is focussing on the role radical mosques may have played in inciting him to have committed the massacre.

The Sunday Times reports that Rezgui lived with a group of four men in the university town of Kairouan, 30 miles from Sousse, and reportedly mainly associated with Salafist extremists in local mosques.

Rezguis' Facebook postings shift from sport and jokes, to radical Islam and support for violent jihad and IS. "If jihad is a crime," he wrote in one, "the world shall know that I'm a criminal."

His Isis nom de guerre references Kairouan, where Rezguis was enrolled as a masters student.

The city is an ancient centre of Sunni Muslim scholarship, and until two years ago was the Tunisian meeting place of Ansar al-Sharia, a Libyan radical Islamist group responsible for the deadly 2012 attack on the US embassy in Libya.

Rezguis was not the only Tunisian seduced by radical Islam, with an estimated 3,500 young Tunisians, many from impoverished rural areas travelling to join Isis in Syria and Iraq.

Coming only months after the attack on the Bardo museum in Tunis which left 22, mainly tourists, dead, Tunisia faces urgent questions on how to combat the growing threat from home grown extremists.