TEHRAN — In 1980s Iran, the music all but died.
Clerics banned secular songs as un-Islamic. Police stopped cars to check tape decks and smashed offending recordings. Women were barred from singing or dancing for male audiences.
But music is making a comeback. Teenage girls and boys play music together, women's voices dominate the latest Iranian hits and Western music booms from cars and shopping malls.
Although many of the liberties promised by President Mohammed Khatami have been blocked by the powerful clergy, his influence has relaxed social rules enough to fulfill a pent-up desire for pop culture.
The danger of a backlash is always present, however.
In June, fundamentalist hard-liners cracked down on what they call "acts of social immorality," and young Iranians have been detained on charges of public disorderliness for playing loud music in their cars.
In July, a Tehran court struck at Mohammed Khordadian, an Iranian-American dancer who has performed in the United States and is well-known in Iran. It banned him from teaching dancing for life and sentenced him to a 10-year suspended jail term.
After ousting the shah in 1979 and establishing an Islamic republic, the clerics outlawed all pre-revolutionary music. But in recent years, they have lost some ground to reformers.
In 1999, folk artist Horvash Khalili became the first female singer since the revolution to get government permission to record an album, "Melody of Hamlet." She was allowed to be the lead singer, but with male backup to counter the supposed dangers of a seductive female voice. She was also barred from publicizing the album, and it sold poorly.
Miss Khalili's latest album of folk music, "Wild Gazelle," is different. Accompanied by guitar, dulcimer and the requisite male voices, her voice is louder and clearer, and her photo appears on the cover. A few newspapers ran ads for it, with her picture but dropped them after hard-liners protested.
Still, "Wild Gazelle" has sold well since its release in May.
"It took 1½ years to get permission for my latest album. It's a great success despite numerous limitations, thanks to Khatami's cultural policies," Miss Khalili said.
Mr. Khatami, himself a cleric, appeared to give a highly public stamp of approval to Miss Khalili by being in the audience when she performed at a celebration of the 22nd anniversary of the revolution. He also included her in his delegation when he made an official visit to China in 2000.
"After years of silence, the rebirth of music in recent years is Iran's new revolution," said Miss Khalili.
Many Iranian singers have left Iran and produced their albums in Los Angeles, where there is a large Iranian community. But not Miss Khalili.
"I could have sung from Los Angeles but have decided to observe the minimum rules and seek to promote music within the Islamic Republic," she said.
Until recently, the Los Angeles-based singers could only be heard in Iran on bootleg tapes, but now legal, authorized versions are on sale.
Music schools are flourishing.
Niloufar Sarayedaran, 20, attends Gam training school in northern Tehran twice a week. She plays the drum accompaniment to male classmate Shayan Asadi's dulcimer.
"Music is love, knowledge and soul. If our body needs food, our soul needs music. It's simply illogical to condemn music," she said.
Some hard-line clerics say music comes between the faithful and God, leads to impure thoughts, and is incompatible with the Shi'ite school of Islam that rules Iran.
"To anyone who says music is permissible, I would say one of the Shi'ite saints has banned it," the daily Hayat-e-Nou quoted Karamatollah Malek Hosseini, a mullah in central Iran, as saying recently. Mullah Hosseini is a representative of Iran's supreme leader, Ayatollah Ali Khamenei.
But Hamid Vafaei, director of Mehr Music School, says public demand has made the musical revolution unstoppable. He says even the children of clerics "show interest in music and they can't resist."