January 13, 1847, and essentially terminated hostilities in Alta California. Shortly thereafter, John C. Frémont was appointed Governor of the new California Territory, and Yerba Buena, California, was renamed San Francisco. The Treaty of Guadalupe Hidalgo, signed in February 1848, marked the end of the Mexican–American War. By the terms of the treaty, Mexico formally ceded Alta California along with its other northern territories east through Texas, receiving $15,000,000 in exchange. This largely unsettled territory constituted nearly half of its claimed territory with about 1% of its then population of about 4,500,000. The discovery of gold in Northern California (and subsequent discourse about that discovery in 1848) led to the California Gold Rush. In October 1848, the SS California left New York Harbor, rounded Cape Horn at the tip of South America, and arrived in San Francisco after the 4-month-21-day journey. Thereafter, regular steamboat service continued from the west to the east coast of the United States. During 1848, only an estimated 6,000 to 6,500 people traveled to California to seek gold that year. By the beginning of 1849, word of the Gold Rush had spread around the world, and an overwhelming number of gold-seekers and merchants began to arrive from virtually every continent. In 1849, an estimated 90,000 people arrived in California in 1849—of which 50,000 to 60,000 were from the United States. In 1850, California joined the union as the 31st state. Texas The Republic of Texas had declared independence in 1836, as part of breaking away from Mexico in the Texas Revolution. The following year, an ambassador from Texas approached the United States about the possibility of becoming an American state. Fearing a war with Mexico, which did not recognize Texas independence, the United States declined the offer. In 1844, James K. Polk was elected the United States president after promising to annex Texas. Before he assumed office, the outgoing president, John Tyler, entered negotiations with Texas. On February 26, 1845, six days before Polk took office, the U.S. Congress approved the annexation. The Texas legislature approved annexation in July 1845 and constructed a state constitution. In October, Texas residents approved the annexation and the new constitution, and Texas was officially inducted into the United States on December 29, 1845, as the 28th U.S. state. Mexico still considered Texas to be a renegade Mexican state, and never considered land south of the Nueces River to be part