Thomas Jefferson's tenure as the third president of the United States began on March 4, 1801, and ended on March 4, 1809. Jefferson assumed the office after defeating incumbent president John Adams in the 1800 presidential election. The election was a political realignment in which the Democratic-Republican Party swept the Federalist Party out of power, ushering in a generation of Jeffersonian Republican dominance in American politics. After serving two terms, Jefferson was succeeded by Secretary of State James Madison, also of the Democratic-Republican Party.
Jefferson took office determined to roll back the Federalist program of the 1790s. His administration reduced taxes, government spending, and the national debt, and repealed the Alien and Sedition Acts. In foreign affairs, the major developments were the acquisition of the gigantic Louisiana Purchase from France in 1803, an embargo against trade with both Great Britain and France, and worsening relations with Britain as the United States tried to remain neutral in the midst of the Napoleonic Wars that engulfed Europe. He established a military academy, used the Navy to protect merchant ships from Barbary pirates in North Africa, and developed a plan to protect U.S. ports from foreign invasion by the use of small gunboats (a plan that proved useless when war came in 1812). He also authorized the Lewis and Clark Expedition to explore the Louisiana Territory and the Pacific Northwest.