Answer :
It was given to the US during the Mexican Cession in the United States. The Arizona Territory was divided into the North and the South. The Northern part of Arizona was a part of the New Mexico Territory while the Southern part was a part of the US territory. Hope this helps.