The Montana Territory was formed on April 26, 1864, when the U.