<P> The official form of government was representative democracy though at times it was controlled by a military junta or otherwise unelected government . After becoming head of the armed forces in 1933, colonel Fulgencio Batista played a dominant role in Cuban politics over the next decades . The Cuban Revolution of 1953--1959 massively changed Cuban society, creating a socialist state and ending US economic dominance in Cuba, as it aligned the country with the Soviet Union . </P> <P> The Republic of Cuba has been regarded as a client state of the United States . From 1902--1932 Cuban and United States law included the Platt Amendment, which guaranteed the US right to intervene in Cuba and placed restrictions on Cuban foreign relations . In 1934, Cuba and the United States signed the Treaty of Relations in which Cuba was obligated to give preferential treatment of its economy to the United States, in exchange the United States gave Cuba a guaranteed 22 percent share of the US sugar market that later was amended to a 49 percent share in 1949 . </P> <P> 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 $20 million . Cuba gained formal independence from the U.S. on May 20, 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 . </P> <P> Following disputed elections in 1906, the first president, Tomás Estrada Palma, faced an armed revolt by veterans of the war for independence who defeated the government's meager forces . The U.S. intervened by occupying Cuba and named Charles Edward Magoon as Governor for three years . Cuban historians have attributed Magoon's governorship as having introduced political and social corruption . </P>

When did cuba gain independence from the united states