From 1817 to 1825, John Quincy Adams was Secretary of State for the government of James Monroe. ... The Treaty of Adams-Onis was the result of the negotiation between Spain and the United States to fix the border between the United States and the then viceroyalty of New Spain