The Upper Creek were able to discourage most white immigration until after the conclusion of the Creek War. Following their defeat by General Andrew Jackson in August 1814, the Creek tribes were forced to cede 23 million acres to the United States, including remaining land in today's Georgia and most of today's central and southern Alabama. In 1816, the Mississippi Territory (1798–1817) organized Montgomery County. Its former Creek lands were sold off the next year at the federal land office in Milledgeville, Georgia.