TUNIS -- It was the first time Ali Laarayedh had inspected a prison cell, but even then, as the interior minister, his old instincts kicked in.
"I turned around to see who would shut the cell door on me," he said in his quiet manner.
But no one bolted the door. For Mr. Laarayedh had experienced a profound reversal of fortune, mirroring that of the Islamist political party that he helped found. Jailed numerous times in the Interior Ministry as a political prisoner, he now runs the very security agency that once sent him to death row.
His memory of the cells remains vivid. "Even though they are on the ground floor," he said, "once you are inside them you have the impression that you have entered a cave."
Mr. Laarayedh, 57, speaking in his office at a considerable distance above the cells, argued that his grueling prison experiences make him a better minister, sensitive to the abuse of power and the need for not just Tunisia, but all Arab states, to bend their omnipotent secret police to the rule of law.
Others are not convinced of his commitment to the law, at least not in the Western style. Mr. Laarayedh was imprisoned repeatedly, including all the years from 1990 to 2004, for being a founding member of the Renaissance Party, or Ennahda in Arabic, the Islamist political party that dominates Tunisia's first elected post-revolutionary government.
Many in the opposition suspect that when men like Mr. Laarayedh talk about the rule of law, they mean Shariah, or Islamic law, a Koran-based code that is often at odds with Western standards of justice. The minister has also been widely criticized for the level of violence the police still unleash to squelch protests.
The interior minister is one of at least eight cabinet ministers, about one-third of the total, who spent significant chunks of their adult lives behind bars, often in solitary confinement. Some Tunisians believe that a country struggling with unemployment and political upheaval would be better off run by technocrats rather than veteran prisoners lacking real-world experience.
After one notorious episode on Sept. 14, when the American Embassy was sacked, critics mocked Mr. Laarayedh mercilessly for saying essentially that security forces had protected the embassy's front door, but unfortunately the marauders entered through the back. Since that melee, which left four people dead, the police have been unable to apprehend Seifallah Ben Hassine, the leader of the puritanical Salafi movement, who is wanted for helping to inspire it.
In the interview, the minister said his forces were overwhelmed that day by a lack of equipment, including armored vehicles needed to protect the police. On the larger issue of governance, he argued that Tunisia was better off in the hands of those who sacrificed for change.
"We have to choose people who can break with the past and put the country on the path to democracy and a state of law," said Mr. Laarayedh. "If we go back to the old, to the people with experience, nothing will change."
He prefers not to detail his own imprisonment, saying that political detainees of all stripes had to endure the same terrible physical and mental torture. Many died or lost their minds, he said; as for himself, his physical scars are not visible, so it is better to focus on the revolution. When pressed, however, he revealed some contained anger.
"One of the worst forms of torture is when they leave you all alone," he said. "When you pound on the iron door, if you are sick or you need something, and you can pound all night and they do not respond. Believe me, that is the worst contempt and the worst violence that I experienced. They take you for a mouse or a fly, or for nothing at all. You do not exist. You are not even worth being beaten. Do you understand? You are not even worth being beaten."
He can put that behind him, he said, mostly because the revolution succeeded. "I realized all my objectives -- a dictator fell, a democracy for which I gave my life was born and Tunisians are masters of their own destiny," he said.
Mr. Laarayedh said he worried more about the effect his long absences had on his wife, a medical technician, and his three children, as he dedicated his life to political activism.
After obtaining a degree in maritime engineering in 1980, he worked for the government for only a year before going underground. He had odd jobs like teaching math in private schools, and he even got married in 1983 while on the run. His long years in and out of prison began around 1987.
Those years instilled in him the need for Tunisia to reach an equilibrium, he said, for a government able to curb the excesses of both the religious zealots and the liberals. Each camp accuses him of coddling the other.
"I don't want the state to be hostage to either of these extremist tendencies," he said.
He denied that the Renaissance Party worked in collusion with the more puritanical Salafis, who have staged a series of violent protests against art galleries and other liberal institutions. "We try to compromise between modernity, with all its values, and our own authenticity, our Arab Muslim identity," he said, whereas the Salafis create "an antagonism between the present and the past."
Some activists, particularly women, remain skeptical. Tunisia had perhaps the most progressive Arab gender laws for decades, and they believe that the Renaissance Party is shrinking the public space for women. They had hoped for something different given that while underground, the Islamists had emphasized the universal rights of man.
Olfa el-Alem, a political organizer, noted that despite repeated promises to investigate police violence against demonstrators, no results had been publicized.
"I thought the day they gained their liberty they would let others have their freedom as well," said Ms. Alem, referring to the Renaissance leaders.
Mr. Laarayedh and other Renaissance leaders suggested that they lack full control over the levers of state. Mr. Laarayedh said Tunisians cannot yet take their nascent democracy for granted.
"This used to be Ben Ali's desk!" he said, beaming, as he showed a visitor his office. Zine el-Abidine Ben Ali, the leader deposed by the January 2011 revolution, was prime minister when he seized the presidency in a bloodless 1987 coup.
Perhaps the best testament to the fact that democracy will emerge from Tunisia's ferment, Mr. Laarayedh said, is that he now sits at that desk.
"It is a miracle," he said. "If you want to look for irrefutable evidence that there was a revolution here, it is that someone condemned to death by this very ministry has become the minister."
Correction: January 26, 2013, Saturday
This article has been revised to reflect the following correction: An earlier version of this article misidentified the title held by Zine el-Abidine Ben Ali when he seized the presidency in 1987. He was prime minister, not interior minister.world
This article originally appeared in The New York Times.