Idaho Territory was created from Dakota Territory, Nebraska Territory, and Washington Territory on March 4, 1863. At first, the territory included all of modern-day Idaho and Montana, and most of Wyoming. On May 26, 1864, Montana Territory was separated from Idaho Territory, and most of the Wyoming portion was became part of Dakota Territory. The area east of the 111th meridian became part of the new Wyoming Territory on July 25, 1868. This gave Idaho Territory its final borders.