The United States tried to buy the whole island of Cuba. In the Spanish-American war, US troops occupied the bay, because there was a harbour there. The Treaty of Paris, between the United States and Spain ended the war. It gave Cuba its independence from Spain. Spain also gave the territory of Puerto Rico, and the islands of Guam and the Philippines to the United States, amongst others. Cuba, however, came under the political and military infuence of the United States. The US then put presidents and dictators at the head of the Cuban state. These were of course favorable to the interests of the United States. In 1902 the Platt Amendment was appended to the Constitution of the Cuban state. It limited the freedom of Cuba very much. It also said that some territory in the south should be ceded to the United States for a military base. Bound by the amendment, the Cubans granted the US a 99-year lease to the territory. This treaty was made by Tomás Estrada Palma, an American citizen, who became the first President of Cuba.