When the Denver & Rio Grande Railway (D&RG) was chartered in 1870, it had the goal of connecting Denver with El Paso, Texas. But when it reached Raton Pass in 1878, it found that the Atchison, Topeka and Santa Fe Railroad had beaten it to the best crossing into New Mexico. After several years of financially draining battle, the two companies came to an agreement in 1880, and the D&RG, under the direction of William J. Palmer, set its sights on Salt Lake City.