The area that eventually became the U.S. state of Montana played little direct role in the American Civil War. The closest the Confederate States Army ever came to the area was New Mexico and eastern Kansas, each over a thousand miles away. There was not even an organized territory using "Montana" until the Montana Territory was created on May 26, 1864, three years after the Battle of Fort Sumter. In 1861, the area was divided between the Dakota Territory and the Washington Territory, and in 1863, it was part of the Idaho Territory.