Monroe easily won the election of 1816, receiving 183 ballots. He was sixty-one years old when he became president, and had served as a soldier in the Revolution, as a diplomat, and most recently as a cabinet officer. He took office under favorable circumstances, and after his first inaugurating did what no president since Washington had done: he made a goodwill tour through the country. Around the nation he was greeted as one of the most loved Presidents. For this reason, Madison's presidency was known as the "The Era of Good Feelings". Madison helped to annex Florida with the Adams-Onis Treaty and also helped the country survive through the Panic of 1819. Under Madison, the Missouri Compromise passed, and many court rulings (see Court Cases on this website) passed under John Marshall. Monroe also enacted the Monroe Doctrine (1823) (although it was mostly the work of John Quincy Adams
– just like the Adams-Onis Treaty). The Doctrine declared that “The American continents are henceforth not to be considered as subjects for future colonization by any European powers, and the US would consider any foreign challenge to the sovereignty of existing American nations an unfriendly act.