By his own account, he was unruly and rambunctious until he turned 16. That year, Rachid al-Ghannouchi, an Arab nationalist turned Islamist who had studied in Egypt and Syria before returning to Tunisia, took a job teaching Arabic in Kairouan. Mr. Ghannouchi would stay only a year before setting out to eventually form the Islamic Tendency Movement, then the Ennahda Party, but he left a legacy with his students.

“He was always talking about the world and politics,” Mr. Ferjani said. “Why as Muslims are we backwards? What makes us backwards? Is it our destiny to be so?”

The questions posed by Mr. Ghannouchi have shaped successive generations of Islamists, a term that never captures their diversity. The theme was examined in the work of Hassan al-Banna, the founder of the Muslim Brotherhood, whose notion of missionary work proved so successful over 50 years. It was there, too, in the works of Sayyid Qutb, an Egyptian thinker whose writings resonated long after he was hanged in 1966, helping give rise to a militant Islamism that bloodied the Middle East. Later, “The Hidden Duty,” a text that laid the groundwork for the assassination of Anwar Sadat in 1981, tried to resolve the issue. So did Mr. Ghannouchi, who endorsed pluralism and democracy, even as revolution raged in Iran.

In Kairouan’s colonial-era Negra Mosque, Mr. Ferjani and a hundred other youths gathered to study them all. “Read, read, read, read,” he recalled. “Even when I walked, I read.”

Mr. Ferjani eventually made his way to Tunis, the capital, where he joined his old Arabic teacher’s group. “Politics was there from the beginning,” he said in the interview.

Tunisia was ruled at the time by Habib Bourguiba, who was so secular that he once made it a point to drink orange juice on television during Ramadan, the Muslim month of fasting. Mr. Bourguiba, in power since 1957, cracked down on Mr. Ghannouchi’s followers, and with the prospect of many of them being executed, Mr. Ferjani said he helped in plotting a coup d’état. He met many of the organizers at a video store he ran in a low-slung building of white stucco and blue shutters, across the street from Parliament.