At the beginning of the Civil War the southern part of New Mexico Territory joined the Confederacy. Two militia companies organized under the Confederate territorial government. Its Governor, Lieutenant Colonel John Baylor, later gathered soldiers in his own regiments to form an Arizona Ranger Company, one of three planned. Only one, Company A, Arizona Rangers was formed before the Confederacy lost control of the territory in 1862. All these units were then formed into Herbert's Battalion of Arizona Cavalry. They went on to fight together in this unit until May 1863 when the Arizona Battalion had been reduced by losses and it was broken up. Company A still had enough men to continue as a viable company, and was kept in being but renamed as the independent Arizona Scout Company. The other two companies of the Battalion were disbanded and the men consolidated with those of Company A to form the Arizona Scout Company that fought until the end of the war.