War!
The United States Civil War broke out on 12 April 1861. Southerners wanted a route to the Pacific now more than ever.
Since many federal soldiers once stationed in the west were either now fighting in the east, or had defected to the Confederacy, the Confederate soldiers were able to get a temporary foothold.
Further reading: The Civil War in the Western Territories, by Ray Charles Colton.
Thomas Fry Tobey enlisted on 26 May 1862. For this, he was excommunicated from the Quaker faith. He received his commission and fought at Fredericksburg among other battles.
1 August 1861
On 1 August 1861, Lt. Col. John R. Baylor proclaimed that the southern section of the New Mexico Territory was now under Confederate control and protection. He also appointed himself the governor.
14 February 1962
Confederate leaders carved up the New Mexico Territory, then comprising (basically) what we know today as the states of Arizona and New Mexico. However, as they were interested in the southern section, their “Arizona Territory” was the southern portions of the future states of Arizona and New Mexico!
The Confederate Territory of Arizona became official on 14 February 1862 with Mesilla as the capitol. The practice of slavery, legally if not in practice, now stretched almost coast to coast.
28 February 1862
On 28 February 1862, with his company of Texan cavalrymen, Confederate Capt. Sherod Hunter “captured” Tucson, though the town was mostly deserted. With the Confederates in the west in desperate need of supplies, he confiscated both residents’ and the federal government’s property and supplies.
March 1862
In late March 1862, 272 California infantry and cavalry men left Fort Yuma towards Tucson. When it was learned that a small group of Confederates was nearby, Lt. James Barrett and twelve cavalrymen to attack their flank, while the rest of the group would attack from the front.
Barrett caught up with the ten Confederate Rangers at Picacho Pass. The battle lasted more than an hour. Barrett and two other Union soldiers were killed; three were wounded. Two Confederates were wounded, three taken prisoner, and the remaining five retreated to Tucson.
20 May 1862
The dead soldiers were buried near the battlefield and the next day, the Union soldiers retreated west. They encountered a large California Column heading towards Tucson. The California Column reached their destination on 20 May 1862. Hunter and his men had left, and Tucson was back under the Union flag once more.
7 June 1862
On 7 June 1862, Col. Carleton arrived in Tucson. The next day, he proclaimed that the United States Congress was in the process of forming the Arizona Territory. This time, the border separating Arizona from New Mexico was north-south to stop the southerners from proceeding towards California. Carleton appointed himself governor, and the people in the territory lived under martial law.
24 February 1863
After years of political maneuvers and congressional bills submitted, some predating the Civil War, the Territory of Arizona officially became art of the Union on 24 February 1863 when the bill was signed by President Abraham Lincoln.
Arizona did not have its present shape until 1867 when the northwest corner (Pah-Ute County) was given to Nevada.
Further reading: Be It Enacted: the Creation of the Arizona Territory, by B. Sacks.