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 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.