Born into a working-class family, from an early age Ortega opposed Nicaragua's dictator, Anastasio Somoza Debayle, and became involved in the underground movement against his government. Joining the Sandinistas as a student in 1963, Ortega became involved with urban resistance activities and was arrested and imprisoned in 1967. Ortega, like many political prisoners of the Somoza regime, was tortured and abused in jail. Upon release in 1974, he was exiled to Cuba, where he received training in guerrilla warfare from Fidel Castro's Marxist–Leninist government.