ended, the 5th Infantry moved from New Mexico to Kansas to provide security for settlers. By October 1868, the regiment manned seven posts across western Kansas, with headquarters at Fort Riley. In March 1869, Colonel and Brevet Major General Nelson A. Miles took command. Over the next dozen years, the regiment under its new commander would take part in many of the major Indian wars of the Great Plains. Red River War From July 1874 to February 1875, Miles led a mixed force of the 5th Infantry and 6th Cavalry in campaigns against the Southern Cheyenne, Comanche and Kiowa Indians along the Red and Washita Rivers in Indian Territory and Texas. Great Sioux War of 1876–77 In the spring of 1876 the largest Indian confederation of the post-Civil War period formed in the northern plains, led by Sitting Bull and Crazy Horse of the Lakota Indians. The Army organized a three-pronged expedition to round up this force, but the Indians scored major victories against two of the three, stopping George Crook's southern pincer at the Battle of the Rosebud on 17 June and destroying half of the 7th Cavalry, vanguard of Alfred Terry's eastern column, at the Battle of the Little Bighorn on 25–26 June. Reinforcements were rushed in, including the 5th Infantry, which built Fort Keogh at the mouth of the Tongue River in Montana, and began operating from there. Miles and the 5th caught up to Sitting Bull at the Battle of Cedar Creek in late October and, failing to negotiate his surrender, defeated his band in battle, forcing them to abandon most of their food and equipment. 2000 Lakota of this group surrendered on 27 October, although Sitting Bull himself escaped. Three companies of the 5th pursued Sitting Bull along the Missouri River, capturing his camp and scattering his followers on 18 December 1876. Miles returned to the Tongue River with a force from the 5th and 22nd Infantry to pursue Crazy Horse. They captured several important prisoners in the valley below the Wolf Mountains on 7 January 1877, leading to a confrontation with the main body the following day on 8 January, the Battle of Wolf Mountain. The 5th, attacking superior numbers in near-blizzard conditions, drove the Lakota and Cheyenne force off the high ground, forcing them to retreat. The 5th continued to pursue and round up bands from the broken confederacy into the summer of