Mohawks shaved and noses free of piercings, dozens of youths march in military style for hours beneath Indonesia's tropical sun – part of efforts by the authorities to restore moral values and bring the "deviants" back into the mainstream.

But the young men and women have shown no signs of bending. When commanders turn their backs, the shouts ring out: "Punk will never die!" Fists are thrown in the air and peace signs flashed. A few have managed briefly to escape, heads held high as they are dragged back.

Sixty-five young punk rockers arrived at the police detention centre last week after baton-wielding police raided a concert in Aceh – the only province in the predominantly Muslim nation of 240 million to have imposed Islamic laws.

They will be released on Friday, after completing 10 days of "rehabilitation" – from classes on good behaviour and religion to military-style drills aimed at instilling discipline.

Nineteen-year-old Yudi, who goes by only one name, said it was not working.

He tried unsuccessfully to shake off police when they took an electric razor to his spiky mohawk. At the sight of his hair scattered in the grass, he recalled, tears rolled down his face. "It was torture to me," he said.

"I can't wait to get out of here," he added. "They can't change me. I love punk. I don't feel guilty about my lifestyle. Why should I? There's nothing wrong with it."

His girlfriend, 20-year-old Intan Natalia, agreed. Her bleach-blonde hair has been cut to a bob and dyed black and she has been forced to wear a Muslim headscarf.

"They can say what they want, but I like life as a punk," she said. "It suits me."

Two young men hated it so much at the detention centre, they tried to escape.

They pretended they had to go to the bathroom then fled to the provincial capital, Banda Aceh, 30 miles away.

Police found them strolling the streets nine hours later and brought them back. It was just after midnight.

"They said they missed their parents, but it's pretty clear they were lying," said the local police chief, Colonel Armensyah Thay. "They didn't go home. How could they? They've been living on the streets."

The crackdown marked the latest effort by authorities to promote strict moral values in Aceh which, unlike other provinces in the sprawling archipelagic nation, enjoys semi-autonomy from the central government.

That was part of a peace deal negotiated after the 2004 tsunami off Aceh convinced separatist rebels and the army to lay down their arms, with both sides saying they did not want to add to people's suffering.

More than 230,000 people were killed in the towering wave, three-quarters of them in Aceh.