<P> Madison worked diligently to form party lines inside the Congress and build coalitions with sympathetic political factions in each state . In 1800, a critical election galvanized the electorate, sweeping the Federalists out of power, and electing Jefferson and his Democratic - Republican Party . Adams made a few last minute, "midnight appointments", notably Federalist John Marshall as Chief Justice . Marshall held the post for three decades and used it to federalize the Constitution, much to Jefferson's dismay . </P> <P> As president, Jefferson worked to cleanse the government of Adams's "midnight appointments", withholding the commissions of 25 of 42 appointed judges and removing army officers . The sense that the nation needed two rival parties to balance each other had not been fully accepted by either party; Hamilton had viewed Jefferson's election as the failure of the Federalist experiment . The rhetoric of the day was cataclysmic--election of the opposition meant the enemy would ruin the nation . Jefferson's foreign policy was not exactly pro-Napoleon, but it applied pressure on Britain to stop impressment of American sailors and other hostile acts . By engineering an embargo of trade against Britain, Jefferson and Madison plunged the nation into economic depression, ruined much of the business of Federalist New England, and finally precipitated the War of 1812 with a much larger and more powerful foe . </P> <P> The Federalists vigorously criticized the government, and gained strength in the industrial Northeast . However, they committed a major blunder in 1814 . That year the semi-secret "Hartford Convention" passed resolutions that verged on secession; their publication ruined the Federalist party . It had been limping along for years, with strength in New England and scattered eastern states but practically no strength in the West . While Federalists helped invent or develop numerous campaign techniques (such as the first national nominating conventions in 1808), their elitist bias alienated the middle class, thus allowing the Jeffersonians to claim they represented the true spirit of "republicanism ." </P> <P> Because of the importance of foreign policy (decided by the national government), of the sale of national lands, and the patronage controlled by the President, the factions in each state realigned themselves in parallel with the Federalists and Republicans . Some newspaper editors became powerful politicians, such as Thomas Ritchie, whose "Richmond Junto" controlled Virginia state politics from 1808 into the 1840s . </P>

What political parties helped establish the two party system in the united states