For freight, Bakersfield is served directly by two class-1 railroads, Union Pacific, and BNSF. North of the city, each railroad uses its own rail lines; south of the city, they share a line owned by Union Pacific. The route travels over Tehachapi Pass (and through the Tehachapi Loop). There are several spur lines in and around Bakersfield. The majority are operated by the San Joaquin Valley Railroad, owned by Genesee & Wyoming.