James Monroe (; April 28, 1758 – July 4, 1831) was an American statesman, lawyer, diplomat and Founding Father who served as the fifth president of the United States from 1817 to 1825. A member of the Democratic-Republican Party, Monroe was the last president of the Virginia dynasty; his presidency coincided with the Era of Good Feelings. Born into a planter family in Westmoreland County, Virginia, Monroe served in the Continental Army during the American Revolutionary War. After studying law under Thomas Jefferson from 1780 to 1783, he served as a delegate in the Continental Congress. As a delegate to the Virginia Ratifying Convention, Monroe opposed the ratification of the United States Constitution. In 1790, he won election to the Senate, where he became a leader of the Democratic-Republican Party. He left the Senate in 1794 to serve as President George Washington's ambassador to France, but was recalled by Washington in 1796. Monroe won election as Governor of Virginia in 1799 and strongly supported Jefferson's candidacy in the 1800 presidential election.