Thomas Jefferson (1743–1826) was the third president of the United States of America and the principal author of the The Declaration of Independence. He served in the Continental Congress as a representative from Virginia, and was the wartime governor of Virginia. He served as the United States minister to France after the Revolutionary War and was the first secretary of state, under George Washington. He was close friends with James Madison, with whom he cofounded the Democratic-Republican Party in opposition to the Federalist Party. He was elected president in 1800 and oversaw the Louisiana Purchase. A key figure in the Enlightenment and a polymath, Jefferson founded the University of Virginia after his two terms as president. He died a few hours before John Adams, on July 4, 1826, 50 years to the day after the United States officially declared independence.