|In 1879, the Santa Fe Railroad reached Lamy, New Mexico, and in 1880, traveled the final 16 miles (26 km) to Santa Fe, replacing the storied Santa Fe Trail. As the Santa Fe Railroad extended westward, the new town of Albuquerque, platted in 1880, quickly enveloped the area’s original settlement, Ranchos de Alburquerque, founded in 1706.|
The railway fostered the great cattle boom of the 1880s and cow towns sprung up throughout the territory. Cattlemen feuded with each other and with authorities, most notably in the Lincoln County War. Outlaws, including the notorious Billy the Kid, roamed the area. The cattle barons could not keep out sheepherders, and eventually homesteaders and squatters overwhelmed the cattlemen by fencing in and plowing under the "sea of grass" on which the cattle fed. Conflicting land claims led to bitter quarrels among the original Spanish inhabitants, cattle ranchers, and homesteaders. Despite these changes, cattle ranching survived as a mainstay of the New Mexican economy.
Centuries of continued conflict between the Spanish and the Apache and Navajo plagued the territory. The Navajo returned to their original homelands in 1868. Sporadic Apache raiding continued until Apache chief Geronimo finally surrendered in 1886.