Madison's Virginia Plan was the basis for the Convention's deliberations, and he was an influential voice at the convention. He became one of the leaders in the movement to ratify the Constitution, and joined Alexander Hamilton and John Jay in writing The Federalist Papers, a series of pro-ratification essays which remains prominent among works of political science in American history. Madison emerged as an important leader in the House of Representatives and was a close adviser to President George Washington.
During the early 1790s, Madison opposed the economic program and the accompanying centralization of power favored by Secretary of the Treasury Hamilton. Alongside Thomas Jefferson, he organized the Democratic–Republican Party in opposition to Hamilton's Federalist Party. After Jefferson was elected president in 1800, Madison served as his Secretary of State from 1801 to 1809 and supported Jefferson in the case of Marbury v. Madison. While Madison was Secretary of State, Jefferson made the Louisiana Purchase, and later, as President, Madison oversaw related disputes in the Northwest territories.
Madison was elected president in 1808. 