Tucson was probably first visited by Paleo-Indians, known to have been in southern Arizona by about 12,000 years ago. Recent archaeological excavations near the Santa Cruz River have located a village site dating from 4,000 years ago. The floodplain of the Santa Cruz River was extensively farmed during the Early Agricultural period, circa 1200 BC to AD 150. These people constructed irrigation canals and grew corn, beans, and other crops while gathering wild plants and hunting animals. The Early Ceramic period occupation of Tucson saw the first extensive use of pottery vessels for cooking and storage. The groups designated by archaeologists as the Hohokam lived in the area from AD 600-1450 and are known for their red-on-brown pottery.
Jesuit missionary Eusebio Francisco Kino visited the Santa Cruz River valley in 1692, and founded the Mission San Xavier del Bac about 7 miles (12 km) upstream from the site of the settlement of Tucson in 1700. The Spanish established a presidio (fort) on August 20 1775 and the town came to be called "Tucson." Tucson became a part of Mexico after Mexico gained independence from Spain in 1821. Following the Gadsden purchase in 1853, Tucson became a part of the United States of America, although the American military did not formally take over control of the community until March 1856. From August 1861, until mid-1862, Tucson was the capital of the Confederate Arizona Territory. Until 1863, Tucson and all of Arizona was part of New Mexico Territory. From 1867 to 1879, Tucson was the capital of Arizona Territory. The University of Arizona, located in Tucson, was founded in 1885.
By 1900, 7,531 people lived in the city. At about this time, the US Veterans Administration had begun construction on the present Veterans Hospital. Many veterans who had been gassed in World War I and were in need of respiratory therapy began coming to Tucson after the war, due to the clean dry air. The population increased gradually to 13,913 in 1910, 20,292 in 1920, and 36,818 in 1940. In 2006 the population of Pima County, in which Tucson is located, passed one million while the City of Tucson's population was 535,000.
During the territorial and early statehood periods, Tucson was Arizona's largest city and commercial area, whereas Phoenix was the seat of state government and agriculture. The establishment of Tucson Municipal Airport increased its prominence. By the 1920s-30s, Phoenix outgrew Tucson and has continued to expand. Tucson has still been growing but at a slower pace.