A Catholic nun walks past a portrait of Brazilian Rodrigo Gularte, shortly before the arrival of his body at a funeral home in Jakarta, Indonesia, on Wednesday. (Nyimas Laula/Reuters)

Moments before his death, convicted drug smuggler Rodrigo Gularte was quiet and cool, according to the Rev. Charlie Burrows. The priest was with Gularte on Indonesia’s “Execution Island” and said later that he reassured the death-row inmate that they would be meeting in heaven soon; Burrows instructed Gularte to “prepare a garden or something” in the meantime.

Wardens slapped handcuffs on Gularte’s wrists. Then, police started to wrap chains around his legs. He got upset, Burrows said, because he didn’t like to be touched.

“He said to me, ‘Oh, father, am I being executed?'” Burrows told the Australian Broadcasting Corp. The question was a surprise. “I thought he’d got the message he was to be executed.”

[‘Bali Nine’ leaders executed by firing squad in Indonesia]

Gularte’s medical records show he was mentally ill, according to reports. As a child, he was diagnosed with paranoid schizophrenia and bipolar disorder, the BBC reported. He thought he could talk to animals. He saw ghosts and heard voices. It was those voices, in fact, that told him he would be okay when he was sent to death row, Burrows said.

Indonesia’s attorney general had ordered a mental health assessment as well, but the results were never released, according to news reports.

Late Tuesday, Gularte, 42, was led to the execution field on Nusakambangan Island where several other prisoners — including the two ringleaders of the “Bali Nine,” a group convicted of smuggling heroin from Indonesia into Australia — were about to die. The inmates were tied to poles to keep them still. The firing squad got into position.

“I talked to him and he said, ‘This is not right, I made one small mistake and I shouldn’t be having to die for it,'” Burrows told Irish radio station RTE. “He was annoyed more than anything else because he’s a very soft-spoken, quiet and sensitive man.”

Early Wednesday, Gularte was fatally shot for his crime. Seven others were executed, as well. A Philippine woman, Mary Jane Veloso, was granted a temporary, eleventh-hour stay.

[How a Filipino maid skirted death moments before facing an Indonesian firing squad]

“The executions have been successfully implemented, perfectly,” Indonesian Attorney General Muhammad Prasetyo said, according to the Associated Press. “All worked, no misses.”

Gularte’s death cast a spotlight on the controversy surrounding executions of mentally ill inmates around the world.

Several recent cases in the United States have fueled the public outcry. In January, convicted killer Andrew Brannan was executed in Georgia despite claims that he developed post-traumatic stress disorder while serving in the Vietnam War. That month, the state put Warren Lee Hill to death for murdering his girlfriend, though his attorneys had argued that he had the mental capacity of an 11-year-old. Days later, Texas executed Robert Ladd, despite arguments that he was mentally impaired.

One of the most contentious U.S. cases came last month, when Missouri executed Cecil Clayton, a convicted killer who had been in a sawmill accident years before. A piece of wood reportedly penetrated his skull — and doctors were forced to remove part of his brain. His attorneys argued that he suffered an intellectual disability as a result, but the Missouri Supreme Court denied his requests for a stay.

[Missouri executed an inmate who had asked for a stay because part of his brain was removed]

The Washington Post’s Mark Berman reported that the U.S. Supreme Court ruled in 2002 that executing mentally disabled inmates violates constitutional protections against cruel and unusual punishment. The Supreme Court reassessed the ruling last year and declared that state laws that rely too heavily on IQ test results to determine mental competency are unconstitutional.

“Intellectual disability is a condition, not a number,” Justice Anthony Kennedy wrote. He added that inmates “have the opportunity to present evidence of [their] intellectual disability.”

Papang Hidayat, who researches Indonesia for Amnesty International, told The Post that the country’s law on execution procedure does not protect the mentally ill from capital punishment.

However, Hidayat said, Indonesia’s Constitutional Court ruled in 2007 that the death penalty should be limited to the most serious crimes, including drug trafficking. The court also said that the death penalty should not be used on mentally disabled prisoners, Hidayat said.

When Gularte’s attorneys filed for an appeal, Indonesia’s attorney general referred them to the old law, Hidayat said.

Indonesian officers carry the coffin of Rodrigo Gularte. (Bagus Indahono/EPA)

The Indonesian government had announced last year that it was cracking down on drug traffickers in the country to address a “national emergency,” according to Amnesty International.

After the executions on Wednesday, U.N. Secretary General Ban Ki-moon released a statement condemning the deaths and urging the  government to commute other death sentences.

“The Secretary-General reaffirms his belief that the death penalty has no place in the 21st century,” a spokesperson for the secretary-general said in the statement. “This is also the conviction of a growing majority of the international community: a record 117 States voted in the UN General Assembly in December 2014 for a moratorium on the use of the death penalty. The Secretary-General urges all countries where the death penalty is still in place to join this movement and declare a moratorium on capital punishment with a view toward abolition.”

Over the past 25 years, “an average of three countries each year have abolished the death penalty,” according to Amnesty International. Still, the number of executions around the world in 2014 spiked from the year before, the agency said in its most recent report on capital punishment.

[The U.S. executes fewer people, but it still executes more people than most countries]

For years, experts have argued that the mentally disabled are at a severe disadvantage in the criminal justice system. They’re more likely to admit to a crime when under pressure from police, for instance, regardless of whether they committed the crime, according to the National Coalition to Abolish the Death Penalty. The advocacy group says the mentally disabled may not understand their rights and, therefore, are less likely to request legal representation.

Even those who are guilty may not have the mental competency to form an intent to kill — a requirement for capital murder cases in most states in the United States, according to the group.

In 2004, Gularte, an avid surfer, was arrested in Indonesia for smuggling six kilograms of cocaine, which had been hidden inside surfboards, according to 9News in Australia. He was sentenced in 2005.

Brazilian President Dilma Rousseff fought for Gularte’s life. His attorneys filed one last appeal days before his death, arguing that he should be placed in a mental hospital, not a morgue.

In the end, all requests went unanswered.

Ricky Gunawan, Gularte’s Indonesian attorney, called the execution “outrageous.”

“Indonesia has closed its eyes and ears,” Gunawan told the BBC, “and just wanted to execute him regardless of the plausible evidences we had to avoid the execution.”