Iran nuclear deal celebration
Iranians took to the streets to celebrate the nuclear deal in July but the religious authorities in Iran still hold sway.  Getty

A mere hundred feet separate tonight's party venue from the main offices of Iran's intelligence service. Sobnam, 34, behind the wheel in a car full of attendees, parks his car without the faintest sign of fear. "Can you hear the beats?" he smiles, hinting to the echoing music as a measure of confidence.

In spite of Iran's many strict Islamic laws – heterosexual interaction between men and women is forbidden and punishable by lashings and imprisonment, women aren't allowed to dance in the presence of men, rap music isn't strictly illegal but believed to lead to uncontrollable behaviour –Tehrani nights are rife with secret house parties and techno raves.

Behind closed doors Iranian youngsters see themselves as above the law, not part of it. Girls take off hijabs before stepping through the door. The next stop is the master bedroom where they strip their loose manteaus – another indispensable part of the Islamic dress code – and reveal their miniskirts and high heels.

In the living room whisky and vodka flow abundantly while under the kitchen's buzzing hood the first joints are being lit. While obviously at ease with engaging in several illegal activities at once, the crowd does show slight signs of panic each time the doorbell rings. It is always among the possibilities that one of the invitees or the neighbours squealed to the police.

Iran youth
Police raid a mixed-gender party in Shiraz, Iran Iran Gathering/ Facebook

"It is the hardest thing to trust anyone in Iran", several attendees at the party tell me. Most of them already have been arrested and kept in custody for partying on a number of occasions.

But the prospect of getting arrested doesn't deter any of them from partying on. "It is certain that one day you will get arrested if you decide to party," says Gazelle, an art student in her early twenties, "mostly you can bribe the officer at the door. It even has a unofficial fixed price: 50,000 toman." That's the equivalent of £10.

"The last time we had an officer at the door he accepted the money with a smile and told us to enjoy the rest of the party. And if you can't bribe them, you'll spend at most one night in jail. That's not too bad."

Thanks to Rouhani we are more free than ever, but at the same time we're more afraid than ever.

Arrests at parties, so it seems from talking with the crowd, are systematic but symbolic. "Everything is possible in Tehran", adds Sohrab, a 35-year-old jewellery designer from the northern part of the city, "but everything happens with the state's approval. At every large techno party or rock concert there will be some arrests. It's the state's way of telling us: have no illusions, we are always present. It's an agreement between us and them."

Tehrani youth have come a long way since the Islamic Revolution, much more is possible now than was one decade ago, so they respect their so-called agreement with the state.

When Tehrani youth refer to the state, they generally don't refer to reformist President Hassan Rouhani, who repeatedly pleads for respect for people's privacy and opposes crackdowns on women's clothing. They instead refer to police and judiciary, independent from Rouhani's administration and working under the direct control of supreme leader Ayatollah Khamenei.

While youth like to mention to their agreement with the state and party on with ease, there is plenty of reason to question their faith in this agreement. This summer, the judiciary started a harsh nation-wide crackdown on parties. In Shiraz, three weeks ago 63 young men and women were arrested in two separate swoops on parties deemed unlawful by the theocracy's standards.

The same night, 20 university students were arrested at a party in Amol, northern Iran. A few nights before, 60 boys and girls were arrested in a park near Tehran. The raid was carried out by the Basij force, a paramilitary volunteer organisation that enforces public morals, acting under supervision of the Ayatollah's Revolutionary Guard. According to the Fars News Agency, the youngsters were caught dancing and partying, and the state-media report claimed that the young women had violated the Islamic dress code.

The list of raids continues, numbers soar and while the majority of Tehrani youth still catalogue these arrests as harmless and ordinary, there's evidence showing they should reconsider. Since this summer, Iran's judiciary frames youth parties as the work of "foreign diplomatic missions, embassies and consulates".

In a press conference at the start of the summer, the judiciary's spokesperson talked about "signs and evidence" showing underground parties are "being organised and lead" with a "common goal". Moreover, most raided parties would have the same team of organisers. Consequently, youth arrested at these parties risk harsher punishments than before.

Iran youth
Men are seen in a cell after police arrested at least 60 men and women during a raid at a mixed gender party Association of Women and Youth Against Fundamentalism

In the northeastern city of Mashhad, at least two organisers are being held without charges since the end of June. The number of detainees might be larger. In Qazvin, 90 miles northwest of the capital, 35 students were arrested at a graduation party and each was flogged 99 times. Reports of other arrests don't mention punishments, only that the youngsters were handed over to the judiciary for prosecution.

For most Tehranis the crackdown on underground parties is nothing more than a reprisal of the regime's conservative hardliners. As reformists gain popularity, conservatives are ready and willing to compensate every loss in political power with a strict coercion of the Islamic moral agenda.

After the victory of the reformist and moderate coalition in the parliamentary elections in February, President Rouhani expressed hope that more allies in Parliament would allow his government to push for more personal freedoms.

"This is the result," says Mohsen, 32, an English teacher at a private school, "thanks to Rouhani we are more free than ever, but at the same time we're more afraid than ever. Insecurity and fear are the best ways to discipline a people."

The author is a freelance journalist who reports regularly from Iran.