The Great Falls of the Missouri River formed because the Missouri is flowing over and through the Kootenai Formation, a mostly nonmarine sandstone laid down by rivers, glaciers, and lakes in the past. Some of the Kootenai Formation is marine, however, laid down by shallow seas. The river is eating away at the softer nonmarine sandstone, with the harder rock forming the falls themselves. Until relatively recently (in geologic time) the Missouri River in the area had a much wider channel, but it has now settled into its current course, where it will continue to cut more deeply into the sandstone.