The name was taken from that of the Dakota. In their language, Dakota means "allies."
The Dakota Territory consisted of the northernmost part of the land acquired in the Louisiana Purchase of the United States. Most of Dakota Territory was formerly part of the Minnesota and Nebraska territories. When Minnesota became a state in 1858, the left over area between the Missouri River and Minnesota's western boundary fell unorganized.
When the Yankton Treaty was signed later that year, ceding much of what had been Lakota land to the U.S. Government, early settlers formed an unofficial provisional government and unsuccessfully lobbied for United States territory status.
It wasn't until three years later when Washington formally created the Dakota Territory. Then President James Buchanan established the Dakota Territory 2 days before Lincoln took the oath of office. The territory included much of present-day Montana until 1864 and Wyoming until 1868.
The Territory of Dakota was an organized incorporated territory of the United States that existed until November 2, 1889, when that final extent of the territory was split and admitted to the Union as the states of North and South Dakota.