was founded by Franciscan friars under Serra. The mission became a site for a Kumeyaay revolt in 1775, which forced the mission to relocate up the San Diego River. By 1797, the mission boasted the largest native population in Alta California, with over 1,400 neophytes living in and around the mission proper. Mission San Diego was the southern anchor in Alta California of the historic mission trail El Camino Real. Both the Presidio and the Mission are National Historic Landmarks. Mexican period In 1821, Mexico won its independence from Spain, and San Diego became part of the Mexican territory of Alta California. In 1822, Mexico began its attempt to extend its authority over the coastal territory of Alta California. The fort on Presidio Hill was gradually abandoned, while the town of San Diego grew up on the level land below Presidio Hill. The Mission was secularized by the Mexican government in 1834, and most of the Mission lands were granted to former soldiers. The 432 residents of the town petitioned the governor to form a pueblo, and Juan María Osuna was elected the first alcalde ("municipal magistrate"), defeating Pío Pico in the vote. Beyond the town, Mexican land grants expanded the number of California ranchos that modestly added to the local economy. (See, List of pre-statehood mayors of San Diego.) However, San Diego had been losing population throughout the 1830s, due to increasing tension between the settlers and the indigenous Kumeyaay and in 1838 the town lost its pueblo status because its size dropped to an estimated 100 to 150 residents. The ranchos in the San Diego region would face Kumeyaay raids in the late 1830s and the town itself would face raids in the 1840s. Americans gained an increased awareness of California, and its commercial possibilities, from the writings of two countrymen involved in the often officially forbidden, to foreigners, but economically significant hide and tallow trade, where San Diego was a major port and the only one with an adequate harbor: William Shaler's "Journal of a Voyage Between China and the North-Western Coast of America, Made in 1804" and Richard Henry Dana's more substantial and convincing account, of his 1834–36 voyage, the classic Two Years Before the Mast. In 1846, the United States went to war against Mexico and sent a naval and land expedition to conquer Alta California. At first, they had an easy time of it,