In this March 24, 1977, photo, Gen. Jorge Rafael Videla is seen commemorating the first anniversary of the military coup in Asuncion, Argentina. The former Argentine dictator died of natural causes Friday while serving life sentences at the Marcos Paz prison for crimes against humanity.

BUENOS AIRES, Argentina — Former dictator Jorge Rafael Videla, who took power over Argentina in a 1976 coup and led a military junta that killed thousands of his fellow citizens in a dirty war to eliminate people considered to be subversives, died in his sleep Friday while serving life in prison for crimes against humanity. He was 87.

Federal Prison Service Director Victor Hortel said Videla died in the Marcos Paz prison.

He was found lifeless in his bed and declared dead at 8:25 a.m., according to an official medical report cited by the state news agency Telam.

Videla ran one of the bloodiest military governments during South America’s era of dictatorships, and later sought to take full responsibility for kidnappings, tortures, deaths and disappearances when he was tried again and again for these crimes in recent years. He said he knew about everything that happened under his rule because “I was on top of everyone.”

Videla had a low profile before the March 24, 1976, coup, but quickly became the architect of a repressive system that killed about 9,000 people, according to an official accounting after democracy returned to Argentina in 1983. Human rights activists believe the real number was as high as 30,000.

This “dirty war” introduced two frightening terms to the global lexicon of terror: “disappeareds” — people kidnapped and never seen nor heard from again — and “death flights,” in which political prisoners were thrown, drugged but alive, from navy planes into the sea.

Complaints from families looking for missing loved ones were later heard internationally, and suggested that the regime many Argentines initially welcomed as an antidote to political violence and economic chaos was much bloodier than first thought.

Videla’s dictatorship also stood out from others in Latin America for its policy of holding pregnant prisoners until they gave birth, and then killing the women while arranging for illegal adoptions of their babies, usually by military or police families. This happened hundreds of times, and the Grandmothers of the Plaza de Mayo rights group has relentlessly sought to reunite these children, now in their 30s, with their biological families. Last year, Videla was convicted and sentenced again, to a 50-year-term, for the thefts of these babies.

Adolfo Perez Esquivel, who spent 28 months in prison during the dictatorship and won the Nobel Peace Prize for his work documenting Videla’s crimes, said the general’s death should not be cause for celebration, and urged Argentina’s justice system to keep investigating the dirty war era.

“The death of Videla should not bring joy to anyone. We need to keep working for a better society, more just, more humane, so that all this horror doesn’t ever happen, never again,” Esquivel said in an interview with Radio Once Diez. Neither does Videla’s death end an era, Esquivel said: “It goes beyond Videla, it’s a political system that they implemented throughout the country and in Latin America.”

Videla’s regime, known as the “Process of National Reorganization,” ostensibly fought against armed leftist guerrillas, but these movements were already weakened and nearly destroyed at the time of the coup. The junta soon pursued political opponents, union members, student activists and social workers, rousting people from their homes and torturing them in clandestine detention centers.

The process soon spread internationally as the junta joined Operation Condor, an effort launched by Chile’s dictator, Gen. Augusto Pinochet to make sure the countries of South American’s southern cone provided no refuge to each other’s leftist enemies. Paraguay’s dictator Alfredo Stroessner joined the pact, as did the leaders of Bolivia, Brasil, and Uruguay. Secret documents released decades later showed that U.S. Secretary of State Henry Kissinger was kept well informed.

Videla told journalists Maria Seone and Vicente Muleiro, authors of his 2001 biography “The Dictator,” that the three essential elements of his state-sponsored terror campaign were clandestine detention centers, torture to obtain information and the subsequent disappearance of the prisoners, so that they “don’t have identity,” and are “neither alive nor dead.”

Videla’s junta closed Congress, banned political parties, intervened in unions and universities, and imposed an iron censorship over the media. The military leaders engineered a joint venture with the owners of the newspapers La Nacion and Clarin to control newsprint and thus ensure sympathetic coverage.

The high point of Videla’s regime came in 1978, when Argentina hosted soccer’s World Cup. Just blocks from the River Plate stadium where Diego Maradona’s goals made Argentina the champion, detainees were being tortured inside the Navy Mechanics School, a leafy campus where thousands were taken, never to be seen again.

Videla retired in 1981 and handed leadership to a succession of other generals. By then the government was already weakened, pressured by persistent inflation, a sluggish economy and explosive growth in foreign debts after nationalizing the debts of leading private corporations. The dictators then launched an ill-advised war against Britain for the Falkland Islands, which Argentina claims as the Malvinas and considers part of its territory. That military defeat hastened the return of democracy on Dec. 12, 1983.

With constitutional rule restored, then-President Raul Alfonsin created a truth commission to investigate the dictatorship’s crimes, and its report, titled “Never Again,” served as the basis for a historic trial of the dictators, which ended with Videla’s first life sentence in 1985.

Alfonsin’s government also passed amnesty laws designed to put an end to human rights trials for everyone other than the junta leaders, and his successor, President Carlos Menem, then pardoned Videla in 1990.

Videla was free until 1998, when a judge charged him in the baby thefts. He spent a month in prison before asserting the right that Argentines over 70 have to house arrest pending trial.

In 2003, during the presidency of Nestor Kirchner, the Supreme Court nullified the amnesty laws, and a new era of human rights investigations began, finally reaching the trial stage in the last few years. In 2010, Videla was condemned to life in prison for killing 31 political dissidents, and was ordered to serve the time in common prison. The baby thefts conviction, with its 50-year sentence, was handed down in 2012. All of the crimes involved in both convictions were considered crimes against humanity under Argentine law.

Videla ultimately served only five years in prison after his right to serve his time at home because of his advanced age was revoked in 2008. Videla died while standing trial in a case focused on kidnappings and killings related to Operation Condor.

Videla came from a long line of military officers dating back to Argentina’s war of independence from Spain. He was born on August 2, 1925, in Mercedes, a town in Buenos Aires province. His father, Lt. Col. Rafael Videla, participated in an earlier coup that toppled President Hipolito Yrigoyen in 1930. Following family tradition, he went to Argentina’s military college, became a general in 1971 and was designated commander of the army in 1976. He married Alicia Raquel Hartridge in 1948 and had seven children.