Survivors of the regime's reign of terror hailed the decision to increase the original jail term of 30 years for Kaing Guek Eav, better known as Duch, for war crimes and crimes against humanity.
Judges said the initial punishment given to the former prison chief in 2010 did not "reflect the gravity of the crimes" committed in the late 1970s at the "factory of death" that was the S-21 detention centre.
"The crimes by Kaing Guek Eav were undoubtedly among the worst in recorded human history. They deserve the highest penalty available," said Kong Srim, president of the court's highest appeal body.
Wearing a white shirt and a beige jacket, the 69-year-old former maths teacher sat impassively in the dock as the verdict was read out, a brief pursing of the lips the only sign of emotion.
He had appealed for an acquittal on grounds that he was just following orders, but prosecutors also appealed saying the original sentence was too lenient.
The verdict pleased the hundreds of Cambodians, including orange-robed monks and elderly survivors of the brutal 1975-1979 regime, who packed the Phnom Penh court's public gallery to witness the conclusion of Duch's case.
"I'm happy now," said farmer Kim Huoy, who lost 19 family members, including her husband and parents, under the Khmer Rouge.
"It is good that there is justice for victims finally. I will feel peace in my mind now."
Led by Pol Pot, who died in 1998, the Khmer Rouge was responsible for one of the worst horrors of the 20th century, wiping out up to two million people through starvation, overwork and execution.
S-21, also known as Tuol Sleng, was the centre of the Khmer Rouge security apparatus and thousands of inmates were taken from there for execution in a nearby orchard that served as a "Killing Field".
Duch was the first Khmer Rouge cadre to face the international tribunal.
His trial attracted huge interest in a nation still haunted by the brutality of the regime. The milestone final judgement was broadcast live on television.
"This is hopefully the beginning to an end for the Cambodian people in dealing with this dark past," said court spokesman Lars Olsen.
The original verdict had outraged victims because it meant Duch could have walked free in under 18 years given time already served.
Before being taken back to the detention facility where he will spend the rest of his days, Duch briefly pressed his hands together in a traditional greeting to the judges.
During his nine-month trial Duch repeatedly apologised for his role at S-21, but later surprised the court by asking to be acquitted.
Prosecutors argued on appeal that the shock request showed Duch lacked sincere remorse for his actions.
They demanded a life term, to be reduced to 45 years in jail to take account of the time Duch spent in unlawful detention between 1999 and 2007 before the court was established.
"We got more than we asked for," international co-prosecutor Andrew Cayley told reporters Friday, expressing "great satisfaction" with the outcome.
But as victims rejoiced, the verdict came under immediate criticism from observers who accused the supreme court chamber judges of violating Duch's human rights by not giving him credit for the period of unlawful detention.
"It's shocking," said trial monitor Clair Duffy from the US-based Open Society Justice Initiative, adding that the ruling gave "unjustifiable weight to public opinion" in a country where arbitrary pre-trial detention is a big problem.
"There will be many happy Cambodians today but that's got to be balanced against the accused's rights and I don't think that's been done here."
The end of Duch's case comes at a time when the court, dogged by allegations of political interference and criticised for working too slowly, is struggling to attract funds from donor countries. Hundreds of Cambodian employees are currently not receiving their salaries.
A second trial involving the regime's three most senior surviving leaders opened late last year, but there are fears that not all of the defendants, who are in their eighties, will live to see a verdict.