Established in 1789, New Madrid was one of only a handful of settlements in the Spanish territory west of the Mississippi River, and as first a district and later a county its jurisdiction once stretched south to the northern border of Louisiana and west to near present-day Kansas. Under Spanish rule, New Madrid had a post commandant rather than a court system, so defendants were taken to New Orleans for trial. The settlement was established by Col. George Morgan on April 14, 1798, at a former trading post site. Spain secretly ceded Louisiana to France on October 1, 1800, and on April 30, 1803, France agreed in Paris to sell Louisiana to the United States for 15 million dollars, with President Thomas Jefferson announcing the acquisition publicly on July 4. Louisiana Territory was formally transferred to the United States on December 20, 1803, and a ceremony at New Madrid on March 18, 1804, transferred command from Spain to France to the United States. On October 1, 1804, the Territory of Orleans and District of Louisiana were organized, and in March 1805 courts of common pleas and quarter-session of the peace were established at New Madrid. On June 4, 1812, Louisiana Territory was renamed Missouri Territory after Louisiana entered the Union as a state, and on October 1, 1812, Missouri Territory was divided into five counties, one of which extended south to the state of Louisiana. New Madrid County was then repeatedly reduced in size by the organization of Arkansas County on December 31, 1813, Lawrence County on January 15, 1815, Scott County on December 28, 1827, Stoddard County on January 2, 1835, Mississippi County on February 14, 1845, and Pemiscot County on February 18, 1851. Along the way, the county court held its first meeting in March 1814, a circuit court was established in December 1815, Arkansas Territory was created on July 4, 1819, Congress approved the Missouri Enabling Act on March 6, 1820, and Missouri became the 24th state on August 10, 1821. As Missouri's population grew and new counties were formed, New Madrid County shrank until it reached its present boundaries in 1851.