In 1850, San Antonio became the largest city in Texas with 8,235 people, taking the lead from Galveston. Bolstered by the construction of its first railroad in 1877, and a horrible hurricane that had struck Galveston, San Antonio reemerged as the state's largest city in 1900. It remained in the top spot until 1930, when Dallas and Houston overtook the Alamo City. It connected the city to major markets and—increasingly—the mainstream of American society.