TEHRAN — More than 30 college students were arrested, interrogated and within 24 hours were each given 99 lashes for attending a graduation party that included men and women, Iran’s judiciary has announced.

The punishments, which were believed to be part of a wider crackdown by a judiciary dominated by hard-liners, were meted out in Qazvin, about 90 miles northwest of the capital, and were carried out in record time, Mizan, a news agency affiliated with the judiciary, reported on Thursday, citing the city’s prosecutor.

The Qazvin prosecutor, Esmail Sadeghi Niaraki, said that more than 30 female and male students — the women were described as “half naked,” meaning they were not wearing Islamic coverings, scarves and long coats — were arrested while “dancing and jubilating” after the authorities received a report that a party attended both by men and women was being held in a villa on the outskirts of Qazvin.

An arrest warrant was issued, he said, and the defendants were sentenced to 99 lashes after being questioned. “We hope this will be a lesson for those who break Islamic norms in private places,” Mr. Niaraki said.