By the Treaty of Madrid in 1795, Spain ceded to the United States the lands east of the Mississippi between 31°N and 32°28'N. Three years later, in 1798, Congress organized this district as the Mississippi Territory. A strip of land 12 or 14 miles wide near the present northern boundary of Alabama and Mississippi was claimed by South Carolina, as part of the eastern colonies' previous hopeful extensions to the west. In 1787, during constitutional negotiations, South Carolina ceded this claim to the federal government. Georgia likewise claimed all the lands between the 31st and 35th parallels from its present western boundary to the Mississippi River, and did not surrender its claim until 1802. Two years later, the boundaries of Mississippi Territory were extended so as to include all of the Georgia cession.