Valparaíso was on the route from Britain to California, which the United States won from Mexico in 1845. That same port was even the scene of one of the battles of the Anglo-American War of 1812. One American who was in Chile was Wheelwright, who introduced the railway in Chile and nearby Peru in the 1850s. In the California Gold Rush, a massive influx of Chilean miners went to California and many had returned to Chile wealthier than before.