Tehran, Iran - The instructor held up an unfurled green condom as she lectured a dozen Iranian brides-to-be on details of family planning. But birth control was only one aspect of the class, provided by the government and mandatory for all couples before marriage. The other was about sex, and the message from the state was that women should enjoy themselves as much as men and that men needed to be patient, because women need more time to become aroused.
This is not the picture of Iran that filters out across the world, amid images of women draped in the forbidding black chador or of clerics in turbans. But it is just as much a part of the complex social and political mix of Iranian society - and of the state's continuing struggle, almost three decades old, to shape the identity of its people.
In Iran, pleasure-loving Persian culture and traditions blend and conflict with the teachings of Shiite Islam, as well as more than a dozen other ethnic and tribal heritages. Sex education here is not new, but the message has been updated recently to help young people enjoy each other and, the Islamic state hopes, strengthen their marriages in a time when everyday life in Iran is stressful enough.
The emphasis on sexual pleasure, not just health, was recognition that something was not right in the Islamic Republic.
Such flexibility is one way the government shapes, or is shaped by, society's attitudes and behavior. These days, however, its use is an exception. The current government has become far better known for employing the opposite strategy: insisting that society and individuals bend to its demands and to its chosen definition of what it is to be a citizen of Iran.
In fact, both tools remain part of a larger goal: securing the Islamic Republic by remolding people's own definitions of themselves.
In that way, the strategy resembles the failed effort in the Soviet Union to build a national identity - the New Soviet Man - that was based on its own criteria. The Communists used youth camps and raw terror; anyone challenging that identity, which in their case was atheistic, was seen as challenging the state.
Since 1979, the clerics of Iran have tried to forge a new national identity based primarily on a marriage of Shiite Islamic teachings with a revolutionary ideology. Initially, some leaders tried to dilute the pre-Islamic Zoroastrian traditions. But that effort proved impossible and has largely been abandoned.
Other Iranian governments since the 1979 revolution have also tried to adapt to the realities of modernity, but those efforts did not last. President Ali Akbar Hashemi Rafsanjani tried to open the state-controlled economy, and President Mohammad Khatami tried to ease the strict controls on dress, public behavior and free speech.
Both those efforts have been rolled back. Rather than rest comfortably on the reality that the Islamic Republic and its institutions have survived for nearly three decades, hard-line leaders still seem to be afraid that the system is vulnerable. And so their struggle continues.
"From one president to another, the whole orientation of the country changes," said a prominent political scientist in Tehran who, in the current climate of fear, agreed to speak only if he remained anonymous. "Why? Because we do not have a consensus on who we are or where we are going."
He added: "We can easily conclude that the ideological revolutionary order is an elite occupation, rather than a mass occupation."
For the generation born after the revolution, religion has been mandatory, no longer revolutionary. Before then, a woman wore an Islamic covering or hijab, for example, as an act of rebellion. For this generation, the head scarf is an obligation, and taking it off is viewed as a challenge to the state.
"Kids born after the revolution are now much less religious than those born before the revolution," said Mohammad Ali Abtahi, who was a vice president in the Khatami government. "Those born before or even during the revolution, their beliefs were voluntary."
For eight years, Abtahi worked beside Khatami in trying to lower the temperature of the government's rhetoric while allowing a small increase in social freedoms, intended as a salve for a young population. The people now in charge say that the Khatami years threatened to destabilize the system.
But Abtahi smiles, a smile of redemption, and referred to the realities of human nature. "We have not been in power for two years, " he said. "There should not be a single prostitute, there should not be a single bad hijab, not a single gay person. Two years have passed since they came to power, and we see their battle has intensified."
Abtahi and like-minded supporters of the Islamic system want to see the masses persuaded because, they argue, force just pushes people away. "Naturally, in any religious government, if there is more pressure, it does not make people more religious," Abtahi said.
Iran is full of surprises. Life moves on for most people, as they find a way to accommodate to the pressure to conform. Take a walk through northern Tehran, which is more Western-oriented and less religious than other areas. Women wear their head scarves, but continue to push them way back. Young men spike their hair with gel. All are signs of rebellion, all are sharply criticized by the government.
Book City, a three-story shop, is still open. The tables are piled high with self-help books. Mehdi Tavakoli, who works there, said the best-selling titles included "Life, Meditation and Self-Knowing" and "The Game of Life and How to Play It."
Tavakoli said that the government tried to stop publication of some self-help books but that the genre proved so popular, publishers just reissued old editions. Many books promote spiritual and personal awakening through meditation and through ideas with roots in India - practices that do not mesh with the leaders' idea of a good Islamic citizen.
In this climate, the official talk is of conformity, not individual self-discovery. There is interest, for example, in building an Islamic bicycle for women, a boxy contraption that hides a woman's lower body, an effort that has provided comic relief to those who are depressed by the recent social crackdown.
Emad Afrough, a conservative member of Parliament, sees the current repression as a reminder that the Islamic Republic is still a new state, that its formula of religious government is a first and that it is still trying to find the balance between society's needs and the individual's.
He says the Khatami government did not pay enough attention to individual responsibility to society. Now, he says, President Mahmoud Ahmadinejad is not paying enough attention to individual rights. The few exceptions, like the sex education class, illustrate the challenge of finding the middle ground that Afrough says is needed.
"We have to learn to balance individual rights with social rights, individual responsibilities with social responsibilities," he said. "We are at the beginning of this road."