As they struggle to fend off their political opponents in the here and now, Iran's rulers are also taking a longer-term view with an ambitious project to indoctrinate future generations from an early age.
Plans to inject school education with more Islamic content, anti-western values and pro-regime and separate content for boys and girls amount to an attempt at an Iranian-style "Cultural Revolution".
The plan is reminiscent of the upheavals in education that followed the 1979 revolution. But times have changed, and young people in modern Iran are far more exposed to a range of external influences than they were in those days, so it will not be as easy to corral them into unswerving loyalty to the regime.
Education Minister Hamid Reza Haji Babai announced the reforms on December 20, citing a recent statement by Iran's Supreme Leader Ayatollah Ali Khamenei advocating fundamental changes in education. "That means transforming the textbooks and teaching methods," added Haji Babai.
Perhaps significantly, the Education Minister was speaking not to a gathering of educationalists, but to regional governors who were meeting to discuss how to deal with opposition protests.
The idea of bringing Islamic values - or the regime's interpretation of them - back to the heart of the educational process dates back several years.
Only a few months after Mahmoud Ahmadinejad was elected president for the first time in 2005, he reintroduced the institution of "omur-e parvareshi", where special "mentors" keep school pupils on the straight and narrow in terms of political thought as well as Islamic values, and extend this role of minder to a close interest in the child's life outside school. The institution had been abolished under his predecessor, the reform-minded Mohammad Khatami.
An overhaul of the curriculum first began to be discussed three years or more ago. The sweeping changes that President Ahmadinejad's administration has proposed include re-writing school textbooks to make their content more Islamic and gender-specific, and eliminating any subjects deemed too "western" or "secular".
Furthermore, elements of Iran's own history are to be excised, in particular relating to its royal dynasties, a decision that seems intended to curb the growth of nationalist, potentially anti-Islamic sentiment.
The education minister has stated that girls and boys should have separate textbooks from the age of nine, to facilitate different educational tracks for the sexes. This implies the authorities finding the money to print close to two million new books.
Another major component of the reform is the deployment of the Basij militia as both a physical and an ideological presence in the schools.
The Basij volunteer force is subordinate to the Supreme Leader and is currently playing a major role in quelling opposition street protests. Now the Basij ideology is to be used as a teaching model; the militia is setting up shop in schools to provide political indoctrination and military training; and members will act as mentors for pupils.
In addition, a cleric will be placed in every school to supervise religious practice.
A special centre has also been set up to coordinate between clergy and schools, in the shape of the Centre for Cooperation between the Howza-ye Elmieh and Ministry of Education. The Howza or clerical school is based in Qom.
The centre's director Ali Zouelm has announced that 4,200 schools in Iran are to be controlled directly by the clerical establishment.
Nor are universities escaping the change. Plans are in train to segregate classes, and set quotas to limit female enrollment. Women currently account for at least six out of ten university students in Iran.
Nor will the curriculum be left alone. In a speech to university administrators in August, Supreme Leader Ayatollah Ali Khamenei asked them to adapt the teaching of social sciences and humanities to fit the values and traditions of an Islamic society, and purge them of western theories and ideas. As things stood, he said, humanities teaching was liable to lead students to entertain "reservations and doubts about religious principles and beliefs".
All in all, it looks like the regime is planning a return to the revolution in values that came close on the heels of the political upheaval of 1979. By the following year, a Cultural Revolution was under way - the teaching curricula were changed to reflect the new ideology; any texts that did not match up to its Islamic principles were abolished, 6,000 out of 15,000 university academics were dismissed and 35,000 of their 170,000 students expelled.
In the schools, textbooks were rewritten, and new subjects such as the Koran and Arabic language added to school syllabus, and the "omur-e parvareshi" institution arrived to supervise and train schoolchildren in religious and ideological principles.
The transformation of education was enshrined in a law passed in 1987, which stated, "The education system plays a role in shaping students politically and ensuring their adherence to the Islamic Revolution."
Article four of the law put it more succinctly - "Purification takes precedence over education."
Two decades on, this ambitious programme of indoctrination does not seem to have worked.
Instead, a cultural divide has grown up between young people and government; between what children see in their daily lives and the religious strictures of their schools. Many have ended up living two lives, one at school and one at home, where they can watch satellite television and communicate via the internet.
Women have been able to study and advance themselves, despite the restrictions placed upon them; hence their domination of university places. This has produce a generation of educated feminists who fight for Islamic laws to be reformed to give them more rights.
Thus, the very fact that the government has decided to give young people an added dose of moral fibre is something of an admission of failure.
On the streets of Iran, a generation born and raised after 1979 are denouncing the regime's core ideologies in vocal and sometimes violent protests.
As Saeed Paivandi, a sociology professor at the University of Paris, puts it, "The behaviour of the new generation has caused Ahmadinejad's administration to act more rapidly on their educational plans so as to prevent what they regard as cultural deviance."
The Iranian government has a vision of a whole new generation educated within the confines of its restrictive ideology. A proportion of young people will take in the indoctrination they are fed. But past experience suggests they will be in a small minority.
As for the rest - those who aspire to a more open society, a modern way of life, and freedom are being offered the complete opposite by their government. That can only lead to a further estrangement between the rising generation - and ultimately society as a whole - and their rulers.
This article originally was published by IWPR