Secretary of state
As secretary of state, Adams played the leading part in the acquisition of Florida. Ever since the acquisition of Louisiana, successive administrations had sought to include at least a part of Florida in that purchase. In 1819, after long negotiations, Adams succeeded in getting the Spanish minister to agree to a treaty in which Spain would abandon all claims to territory east of the Mississippi River, the United States would relinquish all claims to what is now Texas, and a boundary of the United States would be drawn (for the first time) from the Atlantic to the Pacific Ocean. This Transcontinental Treaty was perhaps the greatest victory ever won by a single man in the diplomatic history of the United States. Adams himself was responsible for the idea of extending the country's northern boundary westward from the Rocky Mountains to the Pacificconsidered a stroke of diplomatic genius. To use his own word, it marked a triumphant epocha in U.S. continental expansion. Before the Spanish government ratified the Transcontinental Treaty in 1819, however, Mexico (including Texas) had thrown off allegiance to the mother country, and the United States had occupied Florida by force of arms.
As secretary of state, Adams was also responsible for conclusion of the treaty of 1818 with Great Britain, laying down the northern boundary of the United States from the Lake of the Woods to the Rocky Mountains along the line of latitude 49° N. Years later, as a member of the House of Representatives, he supported latitude 49° N as the boundary of Oregon from the Rocky Mountains to the Pacific Ocean: I want that country for our Western pioneers. In fact, President James K. Polk's Oregon treaty of 1846 drew that boundary along the line of 49°. The Monroe Doctrine rightly bears the name of the president who in 1823 assumed the responsibility for its promulgation, but its formulation was the work of John Quincy Adams more than of any other single man.