The history of San Francisco is closely tied to its proximity to the Pacific Ocean. It became part of the United States in 1848 with the signing of the Treaty of Guadalupe Hidalgo. With the discovery of gold in 1848, there was a boom in population and immigration. By the 1860s San Francisco began to transform itself into a major city, but in 1906 an earthquake destroyed it. By World War II it became a major supply port for the war, followed by a building boom and a growth in new industries. San Francisco has adapted to challenges throughout its history, and it continues to evolve today.