He came to power in an armed revolution that overthrew the dictatorship of Fulgencio Batista, and was shortly thereafter sworn in as the Prime Minister of Cuba. In 1965 he became First Secretary of the Communist Party of Cuba and led the transformation of Cuba into a one-party socialist republic. In 1976 he became President of the Council of State as well as of the Council of Ministers. He also held the supreme military rank of Comandante en Jefe ("Commander in Chief") of the Cuban armed forces.
Following intestinal surgery from an undisclosed digestive illness believed to have been diverticulitis, he transferred his responsibilities to the First Vice-President, his younger brother Raúl Castro, on July 31, 2006. On February 19, 2008, five days before his mandate was to expire, he announced he would neither seek nor accept a new term as either president or commander-in-chief. On February 24, 2008, the National Assembly elected Raúl Castro to succeed him as the President of Cuba. Fidel Castro remains First Secretary of the Communist Party.