In 1821, the United States purchased Florida from Spain for $5 million. Spain formally relinquished control that same year, transferring the territory to the U.S.