TEHRAN — Iranian police arrested 17 boys and girls over a water fight at a seaside park in the Islamic republic's south, a senior judicial official said on Sunday.

"Seventeen young boys and girls who were squirting water at each other were arrested on Friday in one of the beach parks" in the city of Bandar Abbas, Homozgan province's justice chief Ali Alia said, quoted by ISNA news agency.

"Five were immediately let go," he said, adding the rest were released on bail on Sunday but could face sentences for publicly committing an "act forbidden" (haram) by Islam as well as "insulting police officers".

On July 29, several hundred youths took part in a large-scale water battle using guns and empty bottles at Ab-o-Atash (Water and Fire) park in central Tehran, after organising the event on Facebook and through text messages.

Ten of them were arrested as photos of the event emerged on social networking websites and eventually made their way into the media, but were released Saturday on bail, Shargh newspaper reported Sunday.

Officials and conservative media denounced the event in which, according to circulated photos, soaked boys and girls -- some with their mandatory hijabs askew -- attacked each other with water pistols in heat-weary Tehran.

By law, the Islamic veil is obligatory for all women in Iran.

General Ahmad Rouzbahani, head of the morality police, warned recently in a television appearance that police forces, in accordance with the law, "will act forcefully against this type of action and will not allow such events to happen in public places, or anywhere throughout the country."