The territory that is now Cuba was inhabited by the Ciboney Taíno people from the 4th millennium BC until Spanish colonization in the 15th century. From the 15th century, it was a colony of Spain until the Spanish–American War of 1898, when Cuba was occupied by the United States and gained nominal independence as a  United States protectorate in 1902. As a fragile republic, in 1940 Cuba attempted to strengthen its democratic system, but mounting political radicalization and social strife culminated in a coup and subsequent dictatorship under Fulgencio Batista in 1952. Open corruption and oppression under Batista's rule led to his ousting in January 1959 by the 26th of July Movement, which afterwards established communist rule under the leadership of Fidel Castro. Since 1965, the state has been governed by the Communist Party of Cuba. The country was a point of contention during the Cold War between the Soviet Union and the United States, and a nuclear war nearly broke out during the Cuban Missile Crisis of 1962. Cuba is one of a few extant Marxist–Leninist socialist states, where the role of the vanguard Communist Party is enshrined in the Constitution. Under Castro, Cuba was involved in a broad range of military and humanitarian activities throughout both Africa and Asia.