west of the Mississippi had yet to be granted statehood. Two states were admitted to the union during this decade: Maine in 1820 and Missouri in 1821. The Adams–Onís Treaty, signed in 1819 and ratified by Spain in 1821, ceded Florida to the United States, and established a boundary between New Spain and the United States. Slavery was widespread throughout the southern United States. According to the 1820 U.S. Census, the slave population at that time was 1,538,000. The Missouri Compromise of 1820 prohibited slavery in the former Louisiana Territory north of the parallel 36°30′ north except within the boundaries of the proposed state of Missouri. By the 1830 U.S. Census, the slave population had risen to 2,009,043. With the coordination of the American Colonization Society, many freed African-Americans repatriated to Africa during this decade to the newly formed colony of Liberia. The political mood at the start of the 1820s was referred to as the Era of Good Feelings, following the collapse of the Federalist party. James Monroe, the sitting U.S. president since 1817, was re-elected in 1820, virtually unopposed. In 1823, Monroe introduced the Monroe Doctrine in the State of the Union Address, declaring that any European attempts to recolonize the Americas would be considered a hostile act towards the United States. The feeling of unity during the Monroe administration was dispelled in the presidential election of 1824, which due to an Electoral College stalemate, was decided in the United States House of Representatives. John Quincy Adams was chosen as the sixth U.S. president, despite receiving only 30.9% of the popular vote to Andrew Jackson's 41.3%. This gave rise to Jacksonian Nationalism and the rise of the modern Democratic Party, with Andrew Jackson elected in the 1828 election. Mexico After ten years of civil war in Mexico (then called the "Viceroyalty of New Spain") and the death of two of its founders, by early 1820 the Mexican independence movement was stalemated and close to collapse. However, the Army of the Three Guarantees was formed under the command of Colonel Agustín de Iturbide with the support of patriots and loyalists to secure independence for Mexico and the protection of Roman Catholicism. Iturbide's army was joined by rebel forces from all over Mexico, and quickly gained control of Mexico. On August 24, 1821, representatives of the Spanish crown and Iturbide signed the Treaty of Córdoba, which recognized the Mexican Empire