For other conflicts involving the Apache see Apache War (disambiguation).
The Spanish first encountered the Apache, whom they called Querechos, in 1541 in the Texas panhandle. At the time the Apache were buffalo hunting nomads and semi-nomads who had trading relationships with the Pueblos of the Rio Grande valley. The early contacts were friendly, but in the 17th century, the relationship between Spaniard and Apache deteriorated because of slave raids by the Spaniards and Apache attacks on the Spanish and Pueblo settlements in New Mexico.
The Apache migrated south and west, under pressure from the Comanche who were also expanding southward. Being pushed off the buffalo-rich Great Plains into the more austere desert and mountains of the Southwest, probably caused the Apache to become more dependent upon raiding for a livelihood. By 1692, they were present in the present-day state of Chihuahua, Mexico. They soon were also visiting Sonora and Coahuila and seem to have absorbed several other Indian peoples native to the future U.S.-Mexico border area, the Suma, Manso, Jano, and Jocome. Chihuahua, Sonora, and Coahuila were more populated and richer than the Spanish colonies in New Mexico, and Apache raiding soon became a serious problem. In 1737, a Spanish military officer said, "many mines have been destroyed, 15 large estancias along the frontier have been totally destroyed, having lost two hundred head of cattle, mules, and horses; several missions have been burned and two hundred Christians have lost their lives to the Apache enemy, who sustains himself only with the bow and arrow, killing and stealing livestock."
The Spanish response to the Apache problem in the 1770s was to reorganize its frontier defenses, withdraw from some areas, establish a "cordon of presidios" (forts) along the northern frontier, undertake punitive missions against the Apache, usually with Indian allies, and encourage peace with the Apache. The chain of 18 presidios located about 100 miles (160 km) apart in Sonora, Chihuahua, Texas, New Mexico, and future Arizona was the backbone of the defense against Apache raids. In the late 18th century, presidios each had a complement of 43 soldiers, with the exception of Santa Fe, New Mexico and San Antonio with 76 soldiers assigned to them. The soldiers in the presidios were reinforced by local militia and Indian allies. The most prominent of the presidios was at Janos, Chihuahua Another, the Presidio San Augustin del Tucson became the most important Spanish settlement in Arizona.
The punitive missions of the Spanish against the Apache extracted a heavy toll of lives but were ineffective in halting Apache raids. The intensity of the conflict was at its peak from 1771 to 1776 when in Chihuahua and Coahuila "1,674 Spaniards were killed, 154 were captured, over one hundred ranches were abandoned, and over sixty-eight thousand animals were stolen." Many of the "Spaniard" deaths recorded were probably mestizos and Christian Indians. Apache casualties were also heavy. In October and November 1775, a Spanish military operation headed by Hugo Oconór in New Mexico killed 132 Apache and took 104 prisoners.