Among a flurry of security measures the Tunisian government began after a gunman massacred 38 tourists last month in Sousse was a crackdown on dozens of mosques, creating concerns that the secular government may be falling back toward the authoritarian ways of the former dictatorship.
In the middle of Ramadan this month, the government closed 80 mosques and barred two preachers. But neither the men nor most of the mosques had any known connection with Seifeddine Rezgui, the gunman who carried out the June 26 massacre, officials conceded.
It was another sign that the divisions between Tunisian secularists and Islamists that threatened to tear the country apart in the years after the 2011 Arab Spring uprising here are still playing out.
In a recent interview with the daily newspaper La Presse, Habib Essid, who heads a government led by the secularist party Nidaa Tounes, described the battle to control Tunisia’s 5,000 mosques as a “long-term fight.”
Notably, the main Islamic political party, Ennahda, which holds a token cabinet post in the coalition government, has supported the government’s stance against terrorism and even its regulation of the mosques. Its leaders have condemned the terrorist attacks and told followers that supporting the government, and the country, is more important right now than party support.
“We are all in agreement that no one is allowed to preach violence,” said Zied Ladhari, 39, the Ennahda cabinet member and the minister for vocational training and employment. The closed mosques are ones that were built without permits in a somewhat “anarchical way,” he added. “No one is closing regular mosques.”
But other officials say some regular mosques have, indeed, been closed, and deep ideological differences exist among the main parties over how to combat extremism. The secularists leading the government, many of whom have connections to the old dictatorship, lean toward tight control of mosques and preachers. The government has replaced many Ennahda appointees in the Ministry of Religious Affairs.
Religion was strictly controlled under the dictatorship of Zine el-Abidine Ben Ali. Thousands of Islamists were imprisoned, and the outward display of religion, such as head scarves and beards, was banned in government offices, under a policy of forced secularization.
Ennahda members, and some independent scholars, say the repression actually encouraged extremism, and that removing mainstream Islamists and reducing opportunities for religious education left a void the extremists were able to fill. Thousands who fled the repression under Mr. Ben Ali in 1991 ended up in Afghanistan and were recruited by extremist groups.
In Libya, Tunisians can find work but many have joined extremist groups, compounding the security problem at home. The men behind the country’s two recent attacks on foreign tourists received weapons training in Libya, the government has said.
In the freewheeling period after the overthrow of Mr. Ben Ali in 2011, communities forced out many of the clerics who were seen as loyal to him. But there was a shortage of imams, and Salafist clergymen, some of whom were extremists and even Qaeda loyalists, joined the rush to take over mosques.
Amor Mighri, a quiet-spoken imam and former political prisoner, led the monitoring commission for the Ministry of Religious Affairs and its campaign to weed out the extremists. He toured the country, listening to complaints from the public, interviewing imams and evaluating their sermons.
During a visit to the holy city Kairouan in the summer of 2013, he noted the implicit jihadist references in a sermon by Seifeddine Rais, a young and charismatic spokesman of Ansar al-Shariah who drew a large crowd of youthful followers to a neighborhood mosque. Mr. Mighri said he invited the professed imam to his office and discovered that he had not even completed high school.
“His qualifications were weak,” Mr. Mighri said, adding that the spokesman was a hard-liner who demanded that all Muslims fight all nonbelievers. “He only knows the Quran for the things that go with his vision. He is very selective.”
Many of the Salafists were aggressive and resisted efforts by the authorities to remove them. Some of them were armed. The ministry could not reason with them and had to ask the police to intervene, Mr. Mighri said. Relations between Ennahda and the police were tense at the time and cooperation was poor, but the Ansar al-Shariah spokesman was eventually arrested amid some violence in March 2014.
Under the next government, cooperation with the police improved, and by the end of 2014 the government had removed all those considered extremists, Mr. Mighri said.
Sheikh Taieb, 73, imam of the Great Mosque of Oqba Ibn Nafa in Kairouan, Tunisia’s most venerated place of worship, said Ansar al-Shariah had come close to occupying the central mosque in 2013. The Salafists, in the meantime, took over three mosques in the city, and the police managed to push them out only six months ago.
“Over the past year, the state backed the mosques and things got relatively better,” Sheikh Taieb said. “If we are in this situation, it is because the state is still not strong.”
But the problem of the radicalization of young Tunisians remains.
“There are no extremists who are imams,” Mr. Mighri said, but it does not mean the country had eliminated the extremist mentality. He and others in the ministry are worried that the government is addressing the threat improperly.
The newly appointed minister for religious affairs, Othmane Battikh, is an old-school cleric who served as chief mufti under the dictatorship. He has disbanded Mr. Mighri’s monitoring commission, replaced several senior Ennahda appointees to the ministry, and handed the oversight of mosques largely to the police.
“There is a decrease in extremist discourse,” he said in an interview. “The preachers realized the need to back down.”
But ministry workers have strong objections to his methods.
“We appreciate the police and the important role they play in fighting terrorism, but we want them to stay out of religious affairs,” Abdessalem Atwi, the secretary general of the Union of Preachers, said during a recent protest outside the ministry. “If you bring back the interior ministry, it is the police that will evaluate the sermons.”
Mr. Mighri warned that the ministry must tackle extremism with vigorous debate and not just with the police.
“The current dialogue is very general, it does not go deep enough,” he said. “You have to use solid debate, deep dialogue, in mosques, on the radio, everywhere, so we use our solid arguments so that people can hear and people can be convinced. The minister is not using strong arguments.”