Daniel Ortega Saavedra left law studies at the Central American University in Managua at the age of 18 to join the Marxist Sandinista Liberation Front (FSLN) and soon became head of the underground urban resistance activities against the Somoza regime.
He was imprisoned and tortured several times and was temporarily exiled to Cuba in 1974.
He became a member of the national directorate of the FSLN and fought in the two-year campaign for the Nicaraguan Revolution which overthrew the regime of Anastasio Somoza Debayle in 1979, later becoming its secretary-general.
US-sponsored Contra guerrillas opposed his government from 1982.
The FSLN won the free 1984 elections and Ortega became president, but in February 1990, with the economy in tatters, Ortega lost the presidency to US-backed Violeta Barrios de Chamorro.
Despite repackaging himself as a more moderate democratic socialist, he was also defeated in the 1996 presidential election, by Arnoldo Alemán.