The Minnesota Territory, officially organized on March 3, 1849, included not only what would become the state of Minnesota, but extended west to the Missouri River and included the eastern portions of current-day North and South Dakota.
The territory included land east of the Mississippi ceded to the US from the British in 1783 and organized as the Northwest Territory in 1787. Land west of the Mississippi was acquired as a result of the Louisiana Purchase in 1803. In 1818, the Anglo-American conference agreed that, where no other agreements applied, the 49th parallel would form the northern boundary of US territories. That same year, the lavender areas on the map below were included in Michigan Territory. In 1834 Michigan Territory was expanded to include all of the highlighted areas.
As Michigan prepared for statehood, territorial lands beyond its proposed boundaries were organized into the Wisconsin Territory in 1836. Just two years later, Wisconsin Territory was divided along the Mississippi, with Wisconsin Territory retaining lands east of the Mississippi and the area west of the Mississippi designated as the new Iowa Territory.