The Boise Basin, which contains Idaho City, was one of the nation's richest gold mining districts; gold was discovered in 1862, and more of it was pulled from present-day Boise County than from the entire state of Alaska. At its peak in the mid-1860s, Idaho City was the largest city in the Northwest, and it was this rapid population influx that led to the establishment of the Idaho Territory in 1863. The lower–elevation communities of Horseshoe Bend (Payette River) and Boise (Boise River) were staging areas for the Boise Basin mines.