Guatemala's former dictator Efrain Rios Montt, who faced genocide charges, returns from a break in court in Guatemala City in 2012. According to his lawyer, Rios Montt died Sunday, in Guatemala City of a heart attack.

Former dictator Efrain Rios Montt, who seized power in a 1982 coup and presided over one of the bloodiest periods of Guatemala's civil war as soldiers waged a scorched-earth campaign to root out Marxist guerrillas, died on Sunday, his lawyers said.

Lawyer Jaime Hernandez said the family told him the 91-year-old died of a heart attack. Another of his attorneys, Luis Rosales, said he "died in peace, surrounded by his family."

A U.N. truth commission determined that some 245,000 people were killed or disappeared during Guatemala's 1960-1996 civil war, with the vast majority of the killings attributed to the army or pro-government paramilitary groups. Tens of thousands of those deaths came during Rios Montt's 17-month rule.

Rios Montt was convicted in 2013 of genocide and crimes against humanity for the massacre of 1,771 indigenous Ixil Mayans by security forces under his command.

But the ruling was swiftly set aside and a new trial ordered, dismaying human rights activists and victims who long sought to see him punished for atrocities.

In October, his trial on genocide charges resumed behind closed doors after being suspended for more than a year while his lawyers argued that he was too senile to participate, with no memory and unable to make decisions.

An ex-general known for inspiring fear and giving speeches at a near-shout, Rios Montt was later a longtime member of congress and one of the most influential figures in Guatemalan politics for more than three decades.

Born June 16, 1926, in the city of Huehuetenango, in western Guatemala's highlands, Rios Montt grew up in a conservative Roman Catholic family.

He entered the army in 1946 as a cadet and, over a long career, held nearly every military post there was: troop assistant, platoon commander, instructor, defense secretary. He attended the U.S. School of the Americas in the 1950s, and became a brigadier-general in 1972.

Rios Montt first ran for president in 1974 but lost amid allegations of electoral fraud and was sent to the Guatemalan Embassy in Spain as military attache.

In March 1982, he seized power in a military coup and promptly suspended the constitution, disbanded congress and set in motion a ruthless counterinsurgency campaign that resulted in thousands of deaths. According to a U.N. truth commission, the worst atrocities of the 1960-1996 Guatemalan Civil War took place during his rule.

Nonetheless he continued to receive the support of the United States, where President Ronald Reagan called him "a man of great personal integrity and commitment."

Rios Montt's government was known for summary trials of suspected subversives, and for moralistic Sunday night TV messages from the strongman who had become a born-again evangelical Christian.

"A man who has two women is a pig; a woman who has two men is a hen," he said in one, using slang that translates roughly as a woman of loose morals.

In this 1983 file photo, President Efrain Rios Montt, center, accompanied by Defense Minister Oscar Mejia Victores, left, and army Chief of Staff Hector Mario Lopez Fuentes, stand at the ceremony marking the first anniversary of the coup that brought Rios Montt to power in Guatemala City.

In power, Rios Montt alienated a broad spectrum of society. Much of the military was upset by his shakeups of the hierarchy, businesspeople were irked by his economic policies and many Catholics disliked his fervent Protestantism. That led to his ouster by another putsch in August 1983 headed by his own defense minister.

However he remained popular among many for his social welfare initiatives and for the relative peace his "iron fist" approach brought to some regions. In 1985, a clause was added to the constitution barring him and his progeny from seeking the presidency.

But Rios Montt remained in politics, founding a new conservative party in 1990 and entering congress a decade later when political ally Alfonso Portillo was elected president.

In 2003, Rios Montt was finally able to make another run for president after the Constitutional Court allowed his candidacy. He came in a distant third — in part due to scandals under the government of Portillo, who would later plead guilty in the U.S. to laundering millions of ill-gotten dollars through American banks.

For years Rios Montt enjoyed immunity from prosecution as an elected member of congress. That changed when he lost reelection in 2011 and was ordered into house arrest.

After more than 100 legal appeals were exhausted, his 2013 trial was seen as a historic opportunity to hold a Latin American dictator responsible for abuses committed on his watch.

Dozens of witnesses testified about rapes, massacres, forced displacement and other crimes by soldiers that, prosecutors argued, Rios Montt either ordered or must have known about.

Smartly dressed in a suit and shoes polished to a shine, the former general vehemently maintained his innocence: "It was never my intention or my goal to destroy a whole ethnic group. ... I never ordered attacks on a specific race."

Rios Montt was convicted and sentenced to 80 years. But practically before the ink on the ruling had time to dry, the ruling was tossed over trial irregularities and a new proceeding ordered.

With Rios Montt by then in his late 80s and reportedly suffering from heart disease and spinal problems, human rights watchdogs feared the setback meant he would never be convicted.

At a hearing in January 2015, he was wheeled into court on a gurney ashen-faced, clad in pajamas, covered with a blanket and wearing dark sunglasses. It was a far cry from the man Guatemalans knew: diminutive of stature but with a booming voice, commanding presence and penetrating gaze.

A three-justice panel ruled that one of the judges had to recuse herself, delaying the retrial yet again until it resumed, never to be concluded, in October.

Rios Montt was married to Maria Teresa Sosa and had three children: Adolfo, who joined the army, participated in his father's coup and was killed in 1984 in a rebel downing of a military helicopter; Zury, who was elected to Guatemala's congress and in 2004 married then-U.S. Rep. Jerry Weller (R-Ill.); and Enrique, who also went into the army and served as defense minister.