Construction of La Cabaña was begun in 1763 by King Carlos III of Spain, the controlling colonial power of Cuba, following the temporary capture of Havana by British forces (an exchange was soon made to give Cuba back to the Spanish in exchange for Florida). Replacing earlier fortifications next to the 16th century El Morro fortress, La Cabaña was the largest colonial military installation in the New World by the time it was completed in 1774, at great expenses to Spain.
The fortress served as both a military base and prison over the next two hundred years for both Spain and an independent Cuba. La Cabaña was used as a military prison during the Batista regime. In January 1959, rebels led by Che Guevara captured La Cabaña and used it as a headquarters for several months while leading the Cuban revolution. During his five-month tenure in that post (January 2 through June 12, 1959), Guevara oversaw the revolutionary tribunals and executions of suspected war criminals, traitors, chivatos (informants), and former members of Batista's secret police. The complex is now part of a historical park, along with El Morro, and houses several museums open to the public.