He stayed in the regular army after the war's end. He served in the 10th U.S. Infantry, 9th U.S. Infantry and finally rose to the rank of colonel of the 14th U.S. Infantry on September 6, 1886. In February 1897 Anderson and 100 soldiers of the 14th set up a base in Skagway and Dyea, Alaska at the start of the Klondike gold rush to protect miners along the trails into Canada as well as to keep watch on the border. At the start of the Spanish–American War, he asked for and received reassignment.