SEMARANG, Indonesia — Machmudi Hariono never dreamed of becoming a terrorist. But watching the brutal footage of Muslim Serbs being massacred in Srebrenica in 1995 changed his mind.

Not 10 years later, in 2004, Hariono went to jail for his involvement with Jemaah Islamiyah (JI), the Southeast Asian terror group affiliated with Al Qaeda and behind the deadly 2002 Bali bombings. But today, the convicted terrorist swears he has swapped his AK-47 for fried duck.

The quaint restaurant he manages on the backstreets of Semarang, in Central Java, is part of a social initiative designed to help former terrorists reintegrate into society once they get out of prison.

“It has not been easy abandoning jihad,” Hariono said in a recent interview at his restraurant, preparing for the morning rush. “But that is a consequence of choosing this path. I want to have a clean life now.”

Hariono joined the Moro Islamic Liberation Front in the jungles of the Philippines at age 23, and when he returned to Indonesia he took up with JI.