Michigan was part of the Northwest Territory, which came into being in 1787. Following Gen. Anthony Wayne's victory at Fallen Timbers in 1794, Indian resistance was broken and the British peacefully yielded Detroit in 1796 and Fort Mackinac under the terms of Jay's Treaty. Michigan Territory was established in 1805. During the War of 1812, Michigan was temporarily lost to the British. The area's primary land boom came in the late 1830's and 1840's, spurred by the Erie Canal, reports of the agricultural quality of the land, and the building of roads. Residents ratified a constitution for statehood in 1835. Admission to the Union was delayed because of a border dispute with Ohio over control of Toledo. The dispute was resolved by Toledo going to Ohio and Michigan receiving part of the Upper Peninsula. Michigan became a state on January 26, 1837. The mining boom began in the Upper Peninsula in the mid-1840's with discovery of copper and iron ore, although Indians had known of the mineral deposits.