In the Mexican-American War, the garrison commander avoided conflict with Lieutenant Colonel Cooke and the Mormon Battalion, withdrawing from the town while the Americans marched through the town on their way to California. In the Treaty of Guadalupe Hidalgo (1848), Mexico ceded to the U.S. the northern 70% of modern-day Arizona above the Sonora border along the Gila River. During the California Gold Rush upwards of 50,000 men traveled through on the Southern Emigrant Trail pioneered by Cooke, to reach the gold fields in 1849. The Pima Villages often sold fresh food and provided relief to distressed travelers among this throng and to others in subsequent years.