After the Spanish conquest of Pimeria Alta, the road from Tucson south became an important economic link for the pueblos, missions and ranchos in the Santa Cruz River valley. One fork in the road headed southeast for Arispe the provincial capital. Another fork went southwest for the seaport of Guaymas. The road to Guaymas left the Santa Cruz River at Calabasas and followed Potrero Creek to a walnut grove (los nogales) in a pass through the hills. In 1841, the Elías family received a land grant from the Mexican government to establish a ranch at Los Nogales. Following the 1853 Gadsden Purchase from Mexico of Tucson and all the surrounding country south of the Gila River, the boundary survey party placed a monument marking the border at Los Nogales in 1855.
Twenty years later, as two transcontinental railroads prepared to cross the Territory of Arizona, the Atchison, Topeka & Santa Fe made plans for a rail connection with Guaymas. William Ray Morley surveyed a route through Los Nogales in 1878 and the following year the Sonoran Railway was formed in Mexico as a subsidiary of the ATSF. In 1880, San Francisco merchant Jacob Issacson built a trading post in Nogales pass. The Santa Rita Hotel opened nearby a few years later. Within days of the hotel opening, October 25, 1882, the young daughter of surveyor Morley drove the last spike linking Guaymas with the Southern Pacific Railroad at Benson. It was the first rail line linking the US and Mexico. A Post Office was established in the Issacson store for the community of Issacson, sometimes also called Line City, right on the border. But when the railroad built its depot there it chose to name the stop Nogales.