JAKARTA, Indonesia (AP) — Indonesia’s authorities were set to deport on Saturday an Australian surfer who apologized for attacking several people while drunk and naked in the deeply conservative Muslim province of Aceh.

Bodhi Mani Risby-Jones, 23, from Queensland, was detained in late April on Simeulue Island, a surf resort, after police accused him of going on a drunken rampage that left a fisherman with serious injuries.

Risby-Jones was released from prison on Tuesday after he went through a restorative justice process, apologized for the attack and agreed to pay compensation to the fisherman. That allowed him to avoid going to court and facing a possible charge of assault that could have landed him up to five years in prison.

His lawyer, Idris Marbawi, said the two sides agreed that Risby-Jones would pay the fisherman’s family for hospital fees and a traditional peace ceremony. The total payment was 300 million rupiah ($20,000). The fisherman underwent surgery in Banda Aceh, the provincial capital, for broken bones and an infection in his legs.

“Risby-Jones is the first foreigner to successfully resolve a case through restorative justice in Aceh province,” Marbawi said. “He deeply regretted what happened and vowed to return to Indonesia for surfing.”

After his release, Risby-Jones stayed at an immigration detention center. He was due to depart for Melbourne on Saturday evening, Marbawi said.

Footage of his release on Tuesday showed Risby-Jones being escorted by officers to a bus after hugging and saying goodbye to several prison wardens.

“It’s been a long time coming and I’m feeling amazing and super happy and grateful,” he said. “Everyone has been very nice and accommodated me well. Thank you.”

Violent acts by foreigners are rare in Aceh, the only province in Muslim-majority Indonesia that practices Shariah, a concession made by the central government in 2001 as part of efforts to end a decades-long war for independence. The sale and consumption of alcohol is forbidden in Aceh, and those found drunk have been caned in public.