information:classification
First years (1902–1925)

After the Spanish–American War, Spain and the United States signed the Treaty of Paris (1898), by which Spain ceded Puerto Rico, the Philippines, and Guam to the United States for the sum of US$20 million and Cuba became a protectorate of the United States. Cuba gained formal independence from the U.S. on 20 May 1902, as the Republic of Cuba. Under Cuba's new constitution, the U.S. retained the right to intervene in Cuban affairs and to supervise its finances and foreign relations. Under the Platt Amendment, the U.S. leased the Guantánamo Bay Naval Base from Cuba.

Following disputed elections in 1906, the first president, Tomás Estrada Palma, faced an armed revolt by independence war veterans who defeated the meager government forces. The U.S. intervened by occupying Cuba and named Charles Edward Magoon as Governor for three years. Cuban historians have characterized Magoon's governorship as having introduced political and social corruption. In 1908, self-government was restored when José Miguel Gómez was elected president, but the U.S. continued intervening in Cuban affairs. In 1912, the Partido Independiente de Color attempted to establish a separate black republic in Oriente Province, but was suppressed by General Monteagudo with considerable bloodshed.

In 1924, Gerardo Machado was elected president. During his administration, tourism increased markedly, and American-owned hotels and restaurants were built to accommodate the influx of tourists. The tourist boom led to increases in gambling and prostitution in Cuba. The Wall Street Crash of 1929 led to a collapse in the price of sugar, political unrest, and repression. Protesting students, known as the Generation of 1930, turned to violence in opposition to the increasingly unpopular Machado. A general strike (in which the Communist Party sided with Machado), uprisings among sugar workers, and an army revolt forced Machado into exile in August 1933. He was replaced by Carlos Manuel de Céspedes y Quesada.