John Quincy Adams (/ˈkwɪnzi/ (listen); July 11, 1767 – February 23, 1848) was an American statesman, diplomat, lawyer, and diarist who served as the sixth president of the United States, from 1825 to 1829. He previously served as the eighth United States Secretary of State from 1817 to 1825. During his long diplomatic and political career, Adams also served as an ambassador, and as a member of the United States Senate and United States House of Representatives representing Massachusetts. He quickly established a productive working relationship with Russian official Nikolay Rumyantsev and eventually befriended Tsar Alexander I of Russia. Adams continued to favor American neutrality between France and Britain in the midst of the Napoleonic War. Louisa was initially distraught at the prospect of living in Russia, but she became a popular figure at the Russian court. Pro-Adams Speaker of the House John Taylor was replaced by Andrew Stevenson, a Jackson supporter; as Adams himself noted, the U.S. had never before seen a Congress that was firmly under the control of political opponents of the president.