Arizona, south of the Gila River, was obtained via treaty from Mexico in the Gadsden Purchase on June 8, 1854.Tucson became a part of the United States of America, although the American military did not formally take over control until March 1856.From August 1861 to mid-1862, Tucson was the western capital of the Confederate Arizona Territory, the eastern capital being Mesilla.

John Clum, of Tombstone, Arizona fame was one of the passengers. Fort Lowell, then east of Tucson, was established to help protect settlers from Apache attacks.

Brazelton was eventually tracked down and killed on Monday August 19, 1878, in a mesquite bosque along the Santa Cruz River 3 miles (5 km) south of Tucson by Pima County Sheriff Charles A. Brazelton had been suspected of highway robbery not only in the Tucson area, but also in the Prescott region and Silver City, New Mexico area as well. In 1882, Frank Stilwell was implicated in the murder of Morgan Earp by Cowboy Pete Spence's wife, Marietta, at the coroner's inquest on Morgan Earp's shooting. Marshal Wyatt Earp gathered a few trusted friends and accompanied Virgil Earp and his family as they traveled to Benson for a train ride to California.

The Early Ceramic period occupation of Tucson saw the first extensive use of pottery vessels for cooking and storage.

The groups designated as the Hohokam lived in the area from AD 600 to 1450 and are known for their vast irrigation canal systems and their red-on-brown pottery.

Tucson and all of what is now Arizona were part of New Mexico Territory until 1863, when they became part of the new Arizona Territory.

From 1867 to 1877, Tucson was the capital of the Arizona Territory.The Tucson MSA forms part of the larger Tucson-Nogales combined statistical area (CSA), with a total population of 1,010,025 as of the 2010 Census.Tucson is the second-largest populated city in Arizona behind Phoenix, both of which anchor the Arizona Sun Corridor.In 1912, when Arizona statehood became reality, the total number of different flags that had flown over Tucson now numbered five: American, Spanish, Mexican, Confederate, and the State of Arizona.During the territorial and early statehood periods, Tucson was Arizona's largest city and commercial center, while Phoenix was the seat of state government (beginning in 1889) and agriculture.The Spanish name of the city, Tucs├│n Tucson was probably first visited by Paleo-Indians, known to have been in southern Arizona about 12,000 years ago.