Appearing before a special court in his native Cambodia in 2009, Kaing Khek Iev confessed to a role in the brutal Khmer Rouge regime of the late 1970s that made him one of the most prolific mass murderers of recent history.

“I am solely and individually liable for the loss of at least 12,380 lives,” the former chief of the prison and torture center known as Tuol Sleng told the tribunal in the capital, Phnom Penh. “I still and forever wish to most respectfully and humbly apologize to the dead souls.”

In convicting him of crimes against humanity and war crimes in 2010, the international court said the number of his victims probably was “considerably greater.” On appeal, the court rejected his plea for release, unswayed by his conversion to evangelical Christianity and his arguments that he had been merely a “cog” in the Khmer Rouge killing machine.

The tribunal noted as aggravating factors his “leadership role and particular enthusiasm in the commission of his crimes.”

Better known by his nom de guerre, Brother Duch, or simply Duch, the onetime mathematics teacher turned torturer died Sept. 2 at a hospital in Phnom Penh. He was 77. Neak Pheaktra, a spokesperson for the tribunal in Phnom Penh, confirmed the death to the Associated Press. A prison official, Chat Sineang, said that Duch, who was serving a life sentence, was hospitalized after developing breathing problems two days earlier.

Duch (pronounced roughly as “Doik” in the Khmer language) was one of only three former leaders to go on trial for the depredations of the radical communist Khmer Rouge regime, which killed an estimated 2 million Cambodians during its 1975-1979 rule. He was the only one to admit his guilt.

Everyone sent to Tuol Sleng, Duch testified, was automatically presumed guilty and destined for execution in Cambodia’s “killing fields.” He was aware that much of the information in the confessions he extracted was false — fabricated by prisoners who would say anything to stop the torture, he said. But he passed it on to his superiors anyway, perpetuating the cycle of new arrests and killings when inmates named their supposed “accomplices.”

Khmer Rouge executioners typically clubbed prisoners with steel pipes or farm implements — to save bullets, Duch said — then slit their throats and pushed them into open pits. Duch’s men killed children who entered Tuol Sleng by dropping them on their heads from the building’s third floor or, he admitted, by “smashing them against a tree.”

“Everybody who went there, from the smallest child to the highest member of the Communist Party, had the same fate,” Cambodia expert David Chandler testified at Duch’s trial.

His victims included four Americans, detained and tortured at Tuol Sleng into making bogus confessions of espionage before being slaughtered ahead of a Vietnamese invasion that swept the Khmer Rouge from power in January 1979.

Also killed were large numbers of Khmer Rouge officials, soldiers and Tuol Sleng prison guards and interrogators who became targets of purges as the revolution turned inward in a spasm of paranoia and bloodletting.

The grisly activities at the former secondary school — officially known during the regime as S-21, and now the Tuol Sleng Genocide Museum — were detailed in voluminous records that were left behind.

They included “medical experiments” on detainees, some of whom had surgical operations performed on them by students. It was unclear whether the subjects were alive or dead at the time, the court found. According to Duch’s indictment, more than 1,000 other inmates died when all of their blood was drawn for use in transfusions for wounded Khmer Rouge soldiers.

Duch and other Khmer Rouge leaders fled the capital as Vietnamese troops closed in, heading west to the border with Thailand. There he was demoted by his Khmer Rouge superior, Nuon Chea, the infamous “Brother Number Two” under overall leader Pol Pot, for his failure to destroy the documents abandoned at Tuol Sleng.

Using various aliases, Duch later moved to refu­gee camps just inside Thailand, where he learned to speak Thai and English, taught math and worked for American relief agencies.

In 1995, he was injured and his wife was killed in mysterious circumstances during an apparent burglary of his home in western Cambodia, an attack that Duch later claimed was part of an attempt by Pol Pot to keep him quiet about Tuol Sleng. Duch subsequently converted to evangelical Christianity and became a lay pastor. His identity became known in 1999 when Irish-born photographer Nic Dunlop found him in a village in northwestern Cambodia.

In subsequent interviews with Dunlop and American journalist Nate Thayer that were published in the Far Eastern Economic Review, Duch admitted his role in the Khmer Rouge reign of terror. Shortly thereafter, Duch was arrested by Cambodian security forces. In 2009, he became the first Khmer Rouge leader to go on trial before the U.N.-backed special tribunal, officially known as the Extraordinary Chambers in the Courts of Cambodia.

The eldest of five children and the only son, Kaing Khek Iev was born Nov. 17, 1942, into a family of peasants of Chinese origin in central Cambodia’s Kampong Thom province. While studying for a teaching certificate in Phnom Penh, he came under the sway of the school’s director, Son Sen, who would later become Khmer Rouge defense minister.

He taught math at a provincial high school before leaving to join the Khmer Rouge in late 1967 and adopting “Duch” as his revolutionary name. (He said it was the name of both a sculptor admired by his grandfather and a disciplined character in a schoolbook.)

Detected by the security forces of Cambodia’s then-leader, Prince Norodom Sihanouk, Duch was arrested in 1968 and spent two years in prison before being released in an amnesty when Sihanouk was deposed in a coup.

He promptly rejoined the Khmer Rouge insurgents at a jungle hideout, where he was tasked with setting up a prison to detain suspected spies.

When the Khmer Rouge seized power in April 1975, Duch was ordered to help establish prisons, including Tuol Sleng. The leadership was so impressed with his zeal that he was eventually appointed head of the dreaded Khmer Rouge internal security apparatus known as the Santebal.

Duch recruited poor, uneducated teenagers from rural areas and indoctrinated them to interrogate, torture and ultimately kill prisoners without mercy.

In 1975, Duch married Chhim Sophal, a village dressmaker, with the approval of his superiors. They had four children, two of them while he was in charge of Tuol Sleng.

During Khmer Rouge rule, two of his brothers-in-law were purged, one of whom was tortured and executed at Tuol Sleng, Duch testified. He said two of his sisters and six of his nephews and nieces also died.

At his trial, which spanned three years, Duch at times appeared remorseful and apologetic, at other times defensive and pedantic. While acknowledging that he ordered torture and executions, he denied that he had personally killed anyone — an assertion disputed by one witness who said she saw him beat two of her uncles to death with a metal rod.

In a bizarre exchange with one of Tuol Sleng’s few survivors, who said he was imprisoned there when he was 8 years old, Duch maintained that the man’s account could not be true — because he ensured that all children incarcerated with their parents were put to death. Prison records corroborated the survivor’s claim.

Perhaps the most riveting trial testimony came when video was played of a visit Duch made to Tuol Sleng with prosecutors and guards in 2008, when he was in pretrial detention.

“I was frozen with terror when I stepped into this place,” Duch said. “I am filled with indescribable remorse. . . . In the role of S-21 director, I participated in crimes against humanity.”

As he then offered apologies “to all the victims who suffered,” he broke down, wiped tears from his eyes and let out a loud wail.

In July 2010, the trial court sentenced him to 35 years in prison but reduced it by time served, plus five years for his “illegal detention” by the Cambodian military — leaving him with a 19-year sentence. A public outcry ensued, prosecutors appealed, and the tribunal’s Supreme Court Chamber threw out the sentence in February 2012. Instead, it sentenced Duch to life imprisonment, the maximum penalty under Cambodian law, which bans capital punishment.

In his final written statement, a 29-page treatise that was part abject confessional, part history lesson and part plea for understanding and forgiveness, Duch cast himself as a powerless figure in the Cambodian catastrophe.

“I was a cog in an unstoppable machine,” he wrote.