People in conservative and liberal clothing share a sidewalk in Tehran. (AP)

It happens behind closed doors in Iran all the time: Young people get together to play music, flirt and generally relax, hidden away from hard-liners who definitely would not approve. Mostly, the parties wrap up without incident: the guys cleaning up any incriminating clues, the girls putting their headscarves back on. Then they all go their separate ways.

This time, however, someone tipped off authorities that a group of students was throwing a bash to celebrate graduation. More than 30 were taken into custody. Their punishment: 99 lashes each.

The report by Iran’s Mizan News Agency gave no details about the students, their ages, their school, or when the arrests took place. But it noted that lashings were carried out with almost unprecedented swiftness: within less than 24 hours after officials raided the villa on the outskirts of Qazvin, a small city about 80 miles northwest of Tehran.

Such sentences have been an issue before — in October, two Iranian poets were sentenced to lashes and prison terms for shaking hands with the opposite sex at a literary event in Sweden — yet the speed of the students’ punishment suggests that authorities are being given even more leeway to enforce hard-line codes and send messages intended to put liberals on notice.

For decades, Iran has been engaged in a such seesaw political duels.

At times, the voices of reformists and others seeking better terms with the West seem to be on the rise — most recently with the election of moderate President Hassan Rouhani in 2013. The real power, however, has always rested with the ruling clerics and the guardians of the status quo. They include the powerful judiciary and the Revolutionary Guard Corps, which controls citizen-militia forces known as the Basij that often double as a morality police.

Hard-liners now seem to be reasserting their stamp on affairs after last year's landmark nuclear deal with world powers. It can come in big doses, as occurred Thursday when Iran's supreme leader, Ayatollah Ali Khamenei, called on the Revolutionary Guard and other pillars of the establishment to stand against the “soft war” of Western political values and culture.

On Tuesday, an arch-conservative and outspoken critic of the West, Ahmad Jannati, was elected to lead an 88-seat body, the Assembly of Experts, which will select the next supreme leader in the event of Khamenei’s death.

But smaller-level crackdowns, such as the party bust, can matter more to liberal Iranians who are constantly testing the boundaries of tolerance.

Police have stepped up their scold-and-shame campaigns against women whose headscarves drift back too far. Last week, Iran’s judiciary announced the arrest of eight people involved in online modeling (sans headscarf) and questioned a former model on state television. Tehran’s public prosecutor, Abbas Jafari Dowlatabadi, said the real villain was not the Iranian women who posed online, but the infiltration of lifestyles from “the enemy” — shorthand for the West.

In the party case, prosecutor Ismaeil Sadeqi Niaraki was quoted by a news agency as saying that the women were “half naked” — suggesting that they were without headscarves and the typical loose cloaks or tunics worn in public. There was "dancing and jubilating" among the mixed-gender grads.

The prosecutor said authorities would not tolerate “law-breakers who use excuses such as freedom and having fun in birthday parties and graduation ceremonies," the Mizan News Agency reported. Other parties and unspecified "polluted" activities have been targeted around the country in the past week, Iranian media have reported.

Yet amid all the official West-bashing, movie fans Friday gave a hero's welcome to the cast and crew of “The Salesman,” an Iranian film that won two prizes at the Cannes film festival. The plot is based on a Western classic: Arthur Miller’s “Death of a Salesman.”