In Riyadh, Saudi Arabia is hoping to wean jailed Al-Qaeda militants off religious extremism with counselling, spa treatments and plenty of exercise at a luxury rehabilitation centre.
In between sessions with counsellors and talks on religion, prisoners will be able to relax in the centre's facilities which include an Olympic-size indoor swimming pool, a sauna, a gym and a television hall.
The new complex is the work of the Prince Mohammed bin Nayef Centre for Counselling and Care, a body set up seven years ago to rehabilitate extremists jailed during a Saudi crackdown on the local branch of Al-Qaeda.
"Just under 3,000 (Islamist prisoners) will have to go through one of these centres before they can be released," interior ministry spokesman General Mansur al-Turki told AFP during a tour of the new centre.
Another centre has already opened in the western port city of Jeddah, and three more are planned for the north, east and south of the desert kingdom.
The new facility in Riyadh, however, is the first to offer inmates a taste of luxury as an incentive to moderate their beliefs.
The centres bear the name of the current interior minister, who spearheaded the government's crackdown on Al-Qaeda following deadly attacks by the group between 2003 and 2006 in which more than 150 Saudis and foreigners were killed.
Al-Qaeda jihadists, many of them trained in Afghanistan, had targeted Saudi Arabia for allowing US troops to set up bases in the kingdom during the Gulf War and to stay on afterwards, until they eventually withdrew in 2003.
During the crackdown, many militants fled from Saudi into Yemen's lawless southern and southeastern regions where the network formed Al-Qaeda in the Arabian Peninsula in January 2009 -- classified by the United States as the jihadists' deadliest branch.
Prince Mohammed himself survived a suicide attack by a jihadist in August 2009 when a bomber managed to infiltrate the prince's security. The prince suffered only superficial injuries.
The Riyadh centre spreads over an area equivalent to around 10 football pitches and is designed to accommodate 228 prisoners from the "deviant group," the term used by Saudi authorities to refer to Al-Qaeda.
Each of the 12 buildings at the flagship facility will host 19 prisoners, who will have access to special suites where they can spend time with visiting family members.
Good behaviour could earn them a two-day break with their wives.
During the day, the prisoners will attend seminars on religious affairs, aimed at steering them away from thoughts of jihad.
"In order to fight terrorism, we must give them an intellectual and psychological balance... through dialogue and persuasion," said the director of the rehabilitation centres, Said al-Bishi.
He said a total of 2,336 Al-Qaeda prisoners have now been through Saudi rehabilitation schemes.
"The percentage of those who rejoin the deviant minority does not exceed 10 percent," Bishi said, a proportion he described as "encouraging".
AFP tried to speak to several former Al-Qaeda prisoners who had been released after going through rehabilitation but they declined to be interviewed about their experiences.
Not everyone is convinced, however. There have been some high-profile returns to the ranks of the jihad, such as Saeed al-Shehri, who became deputy leader of Al-Qaeda in the Arabian Peninsula after supposedly being rehabilitated.
Liberals are particularly critical of the religious content of the programme which they say draws on an ultra-conservative version of Islam not so different from Al-Qaeda's own.
"We cannot know if the programme will succeed in eradicating terrorism and extremism," social scientist Khaled al-Dakheel told AFP.
"To treat the problem at its root, one should challenge jihadist thought with an enlightened philosophy, not just with other Salafist ideas that are only slightly less extreme," he said.
"There must be pluralism and an acknowledgement of the rights of others to be different."