Following his father's assassination on September 21, 1956, Somoza's elder brother, Luis Somoza, took over the presidency. Anastasio had a large hand in the government during this time and saw to it that the presidency was held by politicians loyal to his family from 1963 to 1967. On 1 May, 1967, shortly before the death of his brother, Anastasio Somoza was himself elected president for the first time. While Luis had ruled more gently than his father had, Anastasio's rule soon resembled that of his father in all significant aspects.
His term in office was due to end in May 1972, due to a law which disallowed immediate re-election. However, prior to that, Somoza worked out an agreement allowing him to stand for re-election in 1974; he would be replaced as president by a three-man junta consisting of two Liberals and one Conservative while retaining control of the National Guard. Somoza and his triumvirate drew up a new constitution that was ratified by the triumvirate and the cabinet on April 3, 1971. He then stepped down as president on May 1, 1972. However, as head of the National Guard, he remained the de facto ruler of the country.
On December 23, 1972, an earthquake struck the nation's capital Managua, killing around ten thousand people, and virtually destroying the city. Martial law was declared, making Somoza ruler of the country once again in name as well as in fact. He took over as head of a National Emergency Committee. The Somoza family was widely accused of pocketing aid sent to the country from abroad; indeed, parts of Managua have never been rebuilt or restored, including the National Cathedral. Roberto Clemente, whose ill-fated trip to Managua was intended to safeguard earthquake supplies, died in a plane crash while traveling to Nicaragua.
Somoza was re-elected president in the 1974 election, partially due to his declaring nine opposition parties illegal. By this time, the Catholic church had begun to speak against his government. (Indeed, one of his fiercest critics was Ernesto Cardenal, a leftist Nicaraguan priest who preached liberation theology and would become the Sandinista government's Minister of Culture.) By the late 1970s, human rights groups were condemning the record of the Somoza government, while support for the Sandinistas was growing inside and outside the country.
In 1975 Somoza Debayle launched a violent campaign against the Sandinista Front; individuals suspected of supporting the Front were targeted. The Front, named after Augusto César Sandino, began its guerrilla war against the Somozas in 1963 and was funded by Cuba under Fidel Castro and the Soviet Union. Support for the Sandinistas ballooned after the earthquake, especially when Jimmy Carter withdrew American support for the regime. This proved critical, since the Somozas had been able to hold onto power largely because the United States saw them as a bulwark against communism. At this point, the opposition to the Somozas included not only Sandinistas, but other prominent figures such as Pedro Chamorro (assassinated on January 10, 1978). In 1979, Somoza resigned the presidency and fled to Miami in a converted Curtiss C-46 where he was denied entry by Jimmy Carter. He later took refuge in Alfredo Stroessner's Paraguay; his regime only survived him by a day, whereupon the Sandinistas took control of the country.
Anastasio Somoza Debayle was assassinated in Asunción, Paraguay, at the age of 54, by a Sandinista commando team using Soviet-made machine guns and RPG-7 anti-tank grenade launchers, and led by the Argentinian Marxist revolutionary Enrique Gorriarán Merlo an ex-ERP (Ejército Revolucionario del Pueblo) member. This episode is described by Gorriarán Merlo himself in his book Memorias ("Memories") ISBN 950-49-1063-7.
The small Sandinista assassination team was waiting in ambush for Somoza as he was being chauffered about the city in an unarmored Mercedes. The team fired a RPG-7 anti-tank shell at the car from close range. The warhead tore open and incinerated Somoza's Mercedes-Benz S-Class, killing him instantly. Somoza was later buried in Miami, Florida at Woodlawn Park Cemetery and Mausoleum (now Caballero Rivero Woodlawn North Park Cemetery and Mausoleum) .
A few months before Somoza’s death, his memoirs, Nicaragua Betrayed, were published. In them he blamed the Carter Administration for his downfall. His son, Anastasio Somoza Portocarrero, went into exile in Guatemala.
Former National Intelligence Officer for Latin America and Cuba expert, Professor Brian Latell, argues in his book After Fidel, that the plan to assassinate Somoza was devised in Havana with direct input from Fidel Castro. According to him, the Sandinistas had won power in July 1979 with the assistance of massive, covert Cuban military aid. Along with his brother Raúl Castro, the two masterminded a complex multinational covert action to provide the Sandinistas with huge quantites of modern armaments. Cuban intelligence and paramilitary advisors poured into Nicaragua along with the equipment. Latell states that the evidence indicated that the assassination operation was similar to other assassination operations Cuban intelligence had been involved in, and that Somoza was a long-time nemesis of Castro after he provided critical support to the U.S. for the failed Bay of Pigs operation in 1961.