Montana territory was organized from the existing Idaho Territory by Act of Congress and signed into law by President Abraham Lincoln on May 28, 1864.
The boundary between the Washington Territory and Dakota Territory was the Continental Divide (as shown on the 1861 map); however, the boundary between the Idaho Territory and the Montana Territory followed the Bitterroot Range north of 46°30'N (as shown on the 1864 map).