John Quincy Adams (July 11, 1767 – February 23, 1848) was an American statesman who served as the sixth President of the United States from 1825 to 1829. He also served as a diplomat, a United States Senator and a member of the House of Representatives. He was a member of the Federalist, Democratic-Republican, National Republican, and later Anti-Masonic and Whig parties. Adams was the son of former President John Adams and Abigail Adams. As a diplomat, Adams played an important role in negotiating many international treaties, most notably the Treaty of Ghent, which ended the War of 1812. As Secretary of State, he negotiated with the United Kingdom over the United States' northern border with Canada, negotiated with Spain the annexation of Florida, and authored the Monroe Doctrine. Historians agree he was one of the greatest diplomats and secretaries of state in American history.