In 1809, President James Madison, a member of the Democratic-Republican Party, appointed Adams as the U.S. ambassador to Russia. Multilingual, Adams held diplomatic posts for the duration of Madison's presidency, and he served as part of the American delegation that negotiated an end to the War of 1812. In 1817, President James Monroe selected Adams as his Secretary of State. In that role, Adams negotiated the Adams–Onís Treaty, which provided for the American acquisition of Florida. He also helped formulate the Monroe Doctrine, which became a key tenet of U.S. foreign policy. In 1818, Adams was elected a member of the American Philosophical Society in Philadelphia.[4]
Adams, Andrew Jackson, William H. Crawford, and Henry Clay—all members of the Democratic-Republican Party—competed in the 1824 presidential election. Because no candidate won a majority of electoral votes, the House of Representatives held a contingent election, which Adams won with the support of Speaker of the House Clay, whom Adams would go on to controversially appoint as his Secretary of State. 