Louisiana was purchased from France in 1803, and the territory was organized into the District of Louisiana and the Territory of Orleans in 1804. Areas that are within the current boundaries of Louisiana, but were outside the Territory of Orleans, were ceded by the Spanish in the Adams-Onís Treaty of 1819. From 1806 until 1811, the Territory of Orleans sent one non-voting delegate to the U.S. House of Representatives. Upon Louisiana's admission to the United States in 1812, and until 1823, Louisiana had only one at-large representative. In 1823, three districts were granted to Louisiana. By 1875, Louisiana had six districts.