The Galveston, Harrisburg and San Antonio Railway Company was chartered on February 11, 1850, as the Buffalo Bayou, Brazos and Colorado Railway Company. Its name was changed on July 27, 1870. The Buffalo Bayou, Brazos and Colorado was the first railroad to begin operating in Texas, the first part of the Southern Pacific Transportation Company to begin operating, and the second railroad west of the Mississippi River. Between 1851 and 1860 the company completed eighty miles between Harrisburg and Alleyton and was in the process of clearing and grading a line along the east bank of the Colorado River in the direction of La Grange and Austin when the outbreak of the Civil War ended construction. The Buffalo Bayou, Brazos and Colorado did no additional construction after the war but did extend its operations into Columbus over the tracks of the Columbus Tap Railway Company in 1867. On July 7, 1868, the company was sold by the sheriff of Harris County in order to satisfy various judgments against the railroad. William D. Sledge, the purchaser, resold 75 percent of the company to various individuals including a 25 percent interest to Thomas W. Peirce, who soon became the dominant force in the company. On January 24, 1870, the railroad was sold under provisions of the 1860 mortgage. Peirce and his associates were again the purchaser and organized a new company under the original name and charter. Subsequent charter amendments, including the name change, the merger of the Columbus Tap, and authorization to build to San Antonio, Houston and Galveston, were approved by the Texas legislature on July 27. Although the company also had authority to build to La Grange and New Braunfels, the main thrust was now San Antonio. Construction west of Columbus under the direction of Maj. James Converse began in April 1873. The railroad reached Schulenburg in December, Waelder in the summer of 1874, Kingsbury in the summer of 1875, and Marion in the spring of 1876. However, the rails did not reach San Antonio, 125 miles from Columbus, until February 5, 1877. It was during this period that Peirce bought the interests of his other associates in the Galveston, Harrisburg and San Antonio, and the railroad was commonly called the Peirce Line. The railroad itself used the nickname Sunset Route, a name that was in general use by 1874 and was later adopted by the Southern Pacific for the entire line between New Orleans and Los Angeles.
As early as 1878 Peirce and Collis P. Huntington, acting for the Southern Pacific interests, were reported to have reached an understanding regarding the expansion of the Galveston, Harrisburg and San Antonio west of San Antonio. In January 1880 Col. J. E. Gray, chief engineer of the Southern Pacific, and Converse left San Antonio to inspect the proposed route to El Paso. In mid-April William Hood of the Southern Pacific began the actual survey. Preliminary work on the Mexican and Pacific Extension, or Sunset extension as it was frequently called, was under way. At this time the Southern Pacific was extending subsidiary companies eastward across Arizona and New Mexico. On reaching the New Mexico-Texas boundary in May 1881, the construction forces continued eastward under provisions of the Galveston, Harrisburg and San Antonio charter. Work was done on two fronts-east from El Paso and west from San Antonio and track laying began at the latter point in late May. Construction was under way before all contracts were in place. Huntington officially acquired an interest in the company on July 1, 1881, and the contract with the construction company was approved on July 5. The two fronts met in January 1883, and on January 12 Peirce drove a silver spike at a point just west of the Pecos River to mark the completion of a new transcontinental route across Texas. In less than two years, 638 miles of track had been completed. In addition, the company also built several branch lines. In 1877 the Galveston, Harrisburg and San Antonio reached Houston over the tracks of the International-Great Northern Railroad Company and built its own line in 1880. Also in 1880 the company completed a line from Smith's Junction to La Grange utilizing the grade that had been partially completed by the Buffalo Bayou, Brazos and Colorado nearly twenty years earlier. In late 1882 the branch from Spofford to Eagle Pass was finished. East of San Antonio the Gonzales Branch Railroad Company was also completed in the same year. The sixty-three miles between Del Rio and Shumla were the most difficult part of the Galveston, Harrisburg and San Antonio to build and operate. The original line had to dip down into the canyon of the Rio Grande on a shelf blasted out of limestone, required two tunnels, and crossed the Pecos River at its confluence with the Rio Grande. In 1892 the company completed a new line that crossed the Pecos on the original High Bridge, shortening the route by 10.7 miles and eliminating the two tunnels and the track through the canyon. This, along with subsequent line relocations, has reduced the rail distance between San Antonio and El Paso by twenty-five miles when compared with the original route.
In 1905 the Galveston, Harrisburg and San Antonio acquired and merged five other Southern Pacific subsidiary companies with a total of 391 miles of track. These were the Gulf, Western Texas and Pacific Railway Company, the New York, Texas and Mexican Railway Company, the San Antonio and Gulf Railroad Company, the Galveston, Houston and Northern Railway Company, and the Gonzales Branch Railroad Company. The Galveston, Harrisburg and San Antonio also completed a forty-seven mile line between Stockdale and Cuero in 1907 and an eleven mile line between Strang and Seabrook in 1914. In 1918 the company completed a new entrance into Houston between Chaney Junction and West Junction, and the original 1880 entry between Chaney Junction and Stella was partly abandoned. Effective January 1, 1925, the company leased the San Antonio and Aransas Pass Railway Company. Between March 1, 1885, and June 30, 1889, the Galveston, Harrisburg and San Antonio was leased to the Southern Pacific Company. Before and after that period the company was operated by its own organization until March 1, 1927, when it was leased to the Texas and New Orleans Railroad Company. It was merged into the latter company on June 30, 1934. The Texas and New Orleans lasted until November 1, 1961, when it was merged into the Southern Pacific Company. On the eve of its merger in 1934 the Galveston, Harrisburg and San Antonio operated 1,345 miles of track, which represented 40 percent of the Southern Pacific owned main track in Texas.