The San Francisco and San Jose Railroad built the first segment of the line from San Francisco to San Jose between 1860 and 1864. The founders of the SF&SJ incorporated as the Southern Pacific Railroad, which was authorized by Congress in 1866 to connect the line from San Jose south to Needles, where it would meet the Atlantic & Pacific Railroad. However, SP had built to Tres Pinos by 1873 and abandoned efforts to continue the line to Coalinga, instead choosing a route from Lathrop. By 1871, SP had completed a line south from San Jose through Gilroy and Pajaro, arriving at Salinas in 1872 and Soledad in 1873. SP halted southward work at Soledad for thirteen years and started building north from Los Angeles in 1873, completing a line to Burbank. In 1886, SP had pushed south from Soledad to King City, Paso Robles, and Templeton; by 1887, the southern portion of the line had been extended through Newhall, Saugus, and Santa Paula to Santa Barbara. By 1894, SP had extended the line south from Templeton to San Luis Obispo. The work continued south to Guadalupe in 1895 and Surf in 1896. The gap between Surf and Santa Barbara was closed with the last spike driven on December 28, 1900. The first version of the Coast Line, via Saugus and Santa Paula through the Santa Clara River Valley, was completed by the Southern Pacific Railroad on December 31, 1900. The work between Ventura and Carpenteria eventually allowed the construction of the Rincon sea-level road for automobile traffic to travel this formerly impassible section of coastline. Work on the Montalvo Cutoff, which crossed the Santa Clara River to serve the farmers in the Oxnard Plain and was extended to Santa Susana in Simi Valley, began in 1898. The Santa Susana Tunnel opened in 1904 connecting with the Chatsworth cutoff from Burbank and thereafter was the main line. In 1907, the Bayshore Cutoff opened from San Bruno to San Francisco; in 1935 the new line around San Jose opened and thereafter was the main line. In the golden era of passenger service SP trains on the San Francisco leg of this route ran from the Third and Townsend Depot in San Francisco to the Union Station in Los Angeles. The Oakland-Los Angeles trains originated from the 16th Street Station in Oakland.
Current lines
The line has several subdivisions. Ownership is currently split into three segments:
In 1992, Southern Pacific granted the Los Angeles County Transportation Commission an option to purchase the entire Coast Line for passenger train operations at. Upgrades to signals and tracks to enable higher-speed operations were estimated to cost $360 million at the time.
Service
Freight
Union Pacific freight trains run on the route, although the Fresno Subdivision through the San Joaquin Valley is the preferred north–south California route due to having easier grades and curves. The freight trains are typically local freights, empty baretable and autorack trains.
Passenger
The Coast Line is used by commuter, regional, and inter-city passenger trains: