Similarly, the residents of the City of Los Angeles approved the expenditure of a good deal of money towards the building of the Southern Pacific Railroad, which had originally planned to bypass the city. The line to San Francisco, including the San Fernando Tunnel through San Fernando Pass, was completed on September 5, 1876. The railroad's route between Saugus and Bakersfield was even longer than that of El Camino Viejo and the Butterfield Overland Stage, heading east through Soledad Canyon before turning north via Palmdale to Mojave and northwest over Tehachapi Pass.