Ahmad Taufik, a journalist with Tempo magazine, died in a Jakarta hospital on 23 March from lung cancer, a disease he most likely acquired from second-hand smoke.

I first became close with Taufik in June 1994, when Soeharto’s authoritarian regime closed three publications in Jakarta: Detik, Editor and Tempo. The closures prompted many street protests, involving journalists, artists, environmentalists, human rights defenders and other professionals. But the government-sanctioned Indonesian Journalists Association (PWI) defended the ban, declaring that it “understood” the government’s rationale.

The PWI position enraged younger journalists. In August 1994, more than 100 journalists established the Alliance of Independent Journalists (Aliansi Jurnalis Independen, AJI). It was a bold decision. Under President Soeharto, all professions were required to have a single, compulsory organisation. Farmers, workers, teachers, fishermen, engineers, architects, journalists – everyone was expected to belong to their respective government-controlled association.

Taufik agreed to be the chairman of the new journalists union. It was a huge risk. He was only 29 and his wife, Syafa Illiyin, had just delivered their first child.

Soon AJI set up a monthly magazine called “Suara Independen” (Independent Voice), which published uncensored news reports, ranging from corruption among Soeharto’s children, to environmental damage caused by state and private firms. It was another unlawful and risky act.

The 1982 Press Law required all publications in Indonesia to apply for a licence, an SIUPP. The Ministry of Information only provided licences for about 250 newspapers and magazines, which were tightly controlled. Licences could be withdrawn at any time and publications that criticised the government or wrote on sensitive issues could have their permits cancelled without legal process.

“Independen” challenged the 1982 regulation, publishing stories like any mainstream newspaper, striving to meet the standards of quality journalism. It soon became the hottest publication in Jakarta. Minister of Information Harmoko and his stooges at the PWI asked the National Police to act against AJI.

In March 1995, Taufik and two other AJI members, Eko Maryadi and Danang K Wardoyo, were arrested, tried and sentenced to three years in prison. The Jakarta District Court found Taufik guilty of expressing “hostility, hatred, or contempt for the government”. AJI’s small office in Tanah Abang, Jakarta, was raided and its bank account, under Taufik’s name, was seized.

Soeharto might have expected AJI to lose steam and to close up shop. His military regime had, after all, managed to uproot hundreds of organisations after it came to power in 1965, and oversaw the massacre of at least 500,000 alleged communists, leftist activists and intellectuals.

But Taufik was easy going and courageous, inspiring his colleagues to keep publishing the magazine. AJI published Suara Independen on the first day of their trial. Underground offices were set up. Secretive printing houses and mobile internet servers were part of their way of doing business. Taufik remained in prison but his spirit inspired his comrades to rise up. Taufik became an icon of the movement for media freedom in Indonesia.

“Inside prison, we mostly spent our time doing push-ups, playing badminton and learning English,” said Tri Agus Susanto Siswowiharjo, another journalist who was sent to prison, in 1995.

But behind bars they also did what they did best: reporting. Where else could you freely interview East Timorese leader Xanana Gusmao, but from inside prison? They also interviewed political prisoners who had been detained following the 1965 coup attempt.

Prison guards were apparently incensed by their reporting. The journalists were moved from Cipinang Prison in Jakarta to Cirebon Prison, hundreds of kilometres away, near the Central Java border. But they continued to report, smuggling news stories out with the help of Taufik’s wife and other visitors. Eventually Taufik was moved again, this time alone, to Kuningan Prison, near Cirebon, in early 1997.

In July 1997, Taufik was released from prison on parole, witnessing the Asian Economic Crisis and predicting the end of Soeharto’s rule. In November that year, I accompanied Taufik to New York, where we visited the offices of the Committee to Protect Journalists (CPJ) and Human Rights Watch. In May 1998, Soeharto was forced to step down, Tempo was relaunched and Taufik was able to join his magazine again.

Since his release, Taufik has remained committed to human rights issues. Yeni Rosa Damayanti, a disability rights advocate, told me that Taufik was also a champion of the rights people with disabilities, especially those with mental health issues. Ging Ginanjar, another AJI journalist, reminded me that Taufik had also set up a militia, the Freedom Guards (Garda Kemerdekaan) to help protect religious minorities.

On 18 March, I visited Taufik in his house in Tanah Abang, where we spoke about his lung cancer, the rise of violent attacks against journalists and the decline of religious freedom in Indonesia.

He reminded me that he never smoked, “Remember the Tanah Abang office?” he said. “We always protested when people smoked at the office, right?”

He listened when I told him about violent attacks on journalists by police, military personnel and government officials, rising to 78 incidents in 2016, compared to 42 in 2015 and 40 in 2014. The 2016 figure was the highest recorded in more than a decade. We discussed our concerns about the increase in attacks and the fact that the 1999 Press Law, which protects free media, is never used to sentence attackers.

He asked his two sons, Ali Anzi Muntazhar and Muhammad Khatami Aji, to greet me. His youngest son, Muhammad, recognised me from the time I visited his Shi’a boarding school in Pasuruan, East Java, when it was under attack in 2011.

Taufik was a Shi’a Muslim. He was also worried about rising attacks against religious minorities, including Shi’a Muslims, in Indonesia. We talked about the Shi’a villagers displaced from Sampang, on Madura Island in East Java. It is now five years since they were forced to leave, but the government seems to be ignoring them. “We have to fight,” he said.

That evening, when I said goodbye, Taufik refused to take my hand but asked me to hug him. I did so, and he grabbed my right hand. He smiled. “Keep up the fight,” he said.

I knew that it was going to be our last meeting. Five days later, from my friends’ Facebook postings, I learned that he had passed away.

Andreas Harsono is Indonesia researcher at Human Rights Watch. He helped establish media freedom groups including the Alliance of Independent Journalists (1994), Institute for the Study of the Free Flow of Information (1995), the Pantau Foundation (2003), and the Bangkok-based South East Asia Press Alliance (1998). Follow him on Twitter @andreasharsono.