Former Guatemalan dictator Efrain Rios Montt has been found guilty of genocide and crimes against humanity during the bloodiest phase of the country's 36-year civil war and sentenced to 80 years in prison.
Hundreds of people who were packed into the courtroom burst into applause, chanting: "Justice!" as Rios Montt received a 50-year term for the genocide charge.
He was also jailed for an additional 30 years for crimes against humanity.
It was the first time a former head of state had been found guilty of genocide in his or her own country.
Rios Montt, now 86, took power after a coup in 1982 and was accused of implementing a scorched-earth policy in which troops massacred thousands of indigenous villagers thought to be helping leftist rebels.
He proclaimed his innocence in court.
Prosecutors say Rios Montt turned a blind eye as soldiers used rape, torture and arson to try to rid Guatemala of leftist rebels during his 1982-1983 rule.
It was the most violent period of a 1960-1996 civil war in which as many as 250,000 people are thought to have died.
He was tried over the killings of at least 1,771 members of the Maya Ixil indigenous group, just a fraction of the number who died during his rule.
A crowd outside the court chanted: "Justice! Justice!" when the guilty verdicts were handed down.
"He had full knowledge of everything that was happening and did not stop it," Judge Yasmin Barrios, who presided over the trial, told a packed courtroom where Mayan women wearing colorful traditional clothes and head-dresses closely followed proceedings.
Nobel Peace Prize winner Rigoberta Menchu was among them.
"Today we are happy, because for many years it was said that genocide was a lie, but today the court said it was true," she said.
Ms Barrios called a hearing for Monday to discuss compensation for the victims of Rios Montt's rule.
Rios Montt's intelligence director, Jose Rodriguez Sanchez, also stood trial, but he was acquitted on both charges.
During the trial, which began on 19 March, nearly 100 prosecution witnesses told of massacres, torture and rape by state forces.
At one point, the trial hung in the balance when a dispute broke out between two judges over who should hear the case.
Rios Montt denied the charges in court on Thursday, saying he never ordered genocide and had no control over battlefield operations.
"I am innocent," he told the courtroom. "I never had the intent to destroy any national ethnic group."
"I have never ordered genocide," he added, saying he took over a "failing" Guatemala in 1982 that was completely bankrupt and full of "subversive guerrillas".
Former US president Ronald Reagan provided support for Rios Montt's government and said in late 1982 that the dictator was getting a "bum rap" from rights groups for his military campaign against left-wing guerrillas during the Cold War.
He also once called Rios Montt "a man of great personal integrity".
Defence attorneys said earlier they would appeal if Rios Montt was convicted.
They argued that prosecution witnesses had no credibility, that specific ethnic groups were not targeted under Rios Montt's 17-month rule and that the war pitted belligerents of the same ethnic group against one another.
Rios Montt has been under house arrest for more than a year.
The right-wing party that he founded changed its name this year to distance itself from its past.
Guatemala's civil war ended with peace accords signed in 1996 but the Central American nation remains a deeply divided society with very poor indigenous areas.
President Otto Perez, a former army general during the civil war, says he was part of a group of captains that stood up to Rios Montt.
Mr Perez was himself implicated in war crimes during the trial when one prosecution witness testified that soldiers under his command had burned down homes and executed civilians during Rios Montt's rule.
Until August 2011, when four soldiers received 6,060-year prison sentences for mass killings in the northern village of Dos Erres in 1982, no convictions had been handed down for massacres carried out during the war.