Rail transportation in the United States consists primarily of freight shipments, with a well integrated network of standard gauge private freight railroads extending into Canada and Mexico. Passenger service is mainly mass transit and commuter rail in major cities. Intercity passenger service, once a large and vital part of the nation's passenger transportation network, plays a limited role as compared to transportation patterns in many other countries. The United States has the largest rail transport network size of any country in the world, at a total of approximately . The nation's earliest railroads were built in the 1820s and 1830s, primarily in New England and the Mid-Atlantic region. The Baltimore and Ohio Railroad, chartered in 1827, was the nation's first common carrier railroad. By 1850, an extensive railroad network had begun to take shape in the rapidly industrializing Northeastern United States and the Midwest, while relatively fewer railroads were constructed in the primarily agricultural Southern United States. During and after the American Civil War, the first transcontinental railroad was built to connect California with the rest of the national network in Iowa. Railroads continued to expand throughout the rest of the 1800s, eventually reaching nearly every corner of the nation. The nation's railroads were temporarily nationalized between 1917 and 1920 by the United States Railroad Administration, as a result of U.S. entry into World War I. Railroad mileage in the nation peaked at this time. Railroads were affected deeply by the Great Depression in the United States, with some lines being abandoned during this time. A major increase in traffic during World War II brought a temporary reprieve, but after the war railroads faced intense competition from automobiles and aircraft and began a long decline. Passenger service was especially hard hit, with the federal government creating Amtrak in 1971 to take over responsibility for intercity passenger travel. Numerous railroad companies went bankrupt starting in the 1960s, most notably Penn Central Transportation Company in 1971, in the largest bankruptcy in the nation's history at the time. Once again, the federal government intervened, forming Conrail in 1976 to assume control of bankrupt railroads in the Northeast. Railroads' fortunes began to change following the passage of the Staggers Rail Act in 1980, which deregulated railroad companies, who had previously faced much stronger regulation than competing modes of transportation. With innovations such as trailer-on-flatcar and intermodal freight transport, railroad traffic began to increase. Following