By the 1840s the prevailing theme in American diplomatic history was continental expansion. In an 1845 editorial, New York newspaperman John L. O'Sullivan captured the mood of the country when he asserted that it was "the right of our manifest destiny to overspread and to possess the whole of the continent which Providence has given us for the development of the great experiment of Liberty and federated self-government entrusted to us." Meanwhile, a new two-party system had emerged in America. In 1832 the war hero Andrew Jackson rode into the presidency claiming to be heir to the Jeffersonian Republican tradition. At the heart of Jackson's new National Republican Party was an ideology that assumed the inherent conflict between "producing" and "nonproducing" classes, an assumption that enabled it to turn to its advantage the fears and aspirations of those voters in the throes of adjusting to the market revolution and simultaneously to those largely untouched by the revolution. Jackson had special appeal to the hundreds of thousands of newly enfranchised voters of the expanding West. It proved impossible for Jackson, as it would have for anyone, to maintain a national consensus in the face of changes wrought by the market economy and westward expansion. Small farmers in the West clamored for greater access to public lands, while those in the South pressed for a greater share of political power. In the Northeast and the Northwest, urban labor mobilized first in local workingmen's parties and later in unions, and the evangelized middle class took up the cause of various moral and social reforms. At the same time, southern slaveholders enacted increasingly repressive slave codes in response to abolitionism and continually pushed the cotton kingdom and its slave labor system into the trans-Mississippi West. Inevitably, during the middle of Jackson's second administration anti-Jacksonians galvanized to form the Whig Party (the National Republicans had by now renamed themselves Democrats). The new organization was a conglomeration of National Republicans, southern proslavery states righters, anti-Masons, high-tariff advocates, and various evangelical reformers from the Northeast.
Andrew Jackson was in favor of continued westward expansion, but he equivocated for fear of alienating northern antislavery elements who saw manifest destiny as a massive conspiracy by slaveholding interests to spread their nefarious institution to the Pacific. James K. Polk, the Democratic presidential candidate in 1844 who had outpolled Henry Clay, shared no such qualms. Under his leadership, the United States established clear title to the Oregon territory and set in motion a series of events that led to the annexation of Texas in 1845. The latter development in turn led to the Mexican War of 1846–1848 and ended the period of increasingly troubled bipartisanship that had characterized American foreign policy since the Era of Good Feelings. Even though the commanding general of U.S. forces in the Mexican War was a Whig, members of that party, including Representative Abraham Lincoln, became increasingly vocal in their criticism of the conflict. Aside from the opportunity the war presented to charge the Democrats with being mindless, unfeeling imperialists, the Whigs were concerned that the conflict with Mexico would add more western territory to the union. The ability of the party to remain national depended in no small part on its ability to finesse the question of whether slavery should be extended into the territories. House Democrat David Wilmot of Pennsylvania introduced a proviso to the appropriations bill of August 1846 that would bar slavery from areas taken from Mexico during the war. Northern support was not sufficient to override the opposition of southern Whigs and Polk Democrats, but California and the New Mexico territory were added to the union as a result of the peace treaty with Mexico (the Treaty of Guadalupe Hidalgo, 1848). The increasingly rancorous debate whether slavery ery in the territories was or should be legitimate would come to dominate national politics.
With the coming of the Civil War, bipartisanship became largely a moot issue because the strength of the Democratic Party lay in the South. When the southern states seceded, Democratic senators and representatives were reduced to a handful. The Lincoln administration's efforts to prevent European intervention on the side of the Confederacy and to interdict trade between Great Britain and France on the one hand and the rebels on the other enjoyed overwhelming support among Republicans and loyalist Democrats.