John Quincy Adams (July 11, 1767 – February 23, 1848) was the sixth President of the United States (1825–1829). He served as American diplomat, Senator, and Congressional representative. 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.