# 1848 United States elections

Elections were held for the 31st United States Congress and the presidency of the United States. The election took place during the Second Party System, nine months after the Treaty of Guadalupe Hidalgo ended the Mexican–American War. With the issue of slavery (and its extension into western territories) dividing the nation, the Free Soil Party established itself as the third most powerful party in Congress. California joined the union before the next election, and elected its first congressional delegation to the 31st Congress. Whigs won the presidency, but Democrats won a plurality in the House and retained control of the Senate.
In the presidential election, Whig General Zachary Taylor defeated Democratic former senator Lewis Cass of Michigan and the Free Soil candidate, former President Martin Van Buren. Taylor won most of the Northeast and several Southern states, giving him a fairly comfortable majority in both the electoral and popular vote. One-term incumbent Democratic President James K. Polk chose to retire rather than seek re-election (becoming the first elected president to do so), and Cass defeated Supreme Court Justice Levi Woodbury and Secretary of State James Buchanan on the fourth ballot at the 1848 Democratic National Convention. Van Buren, the former Democratic president, ran against Cass for political reasons (Cass was a prominent supporter of slavery) and possibly for personal reasons (Cass helped defeat Van Buren's 1844 bid for the Democratic nomination). Taylor was recruited by the Whigs to replicate the success of the Whig's only previous successful candidate, General William Henry Harrison, and he easily triumphed over other Whig candidates. Taylor's win made him the last president to win election as neither a Democrat nor a Republican.
In the House, Democrats picked up a small number of seats, taking the plurality. The Whigs lost a small number of seats but remained the second largest party, while the Free Soil Party picked up a handful of seats. The House elected Democrat Howell Cobb as Speaker after sixty-three ballots. In the Senate, the Whigs won minor gains, cutting into the Democratic majority.
This is the only time after the formation of political parties that the presidency and at least one house of Congress flipped control to different parties in the same election, as well as the only time that a party flipped a chamber of Congress despite losing the presidency.

## Results
### Campaign

The main two parties failed to rally the people to any important issue, and as such both campaigns were fought without much enthusiasm.
Whig campaigners, who included Abraham Lincoln and Rutherford B. Hayes, talked up Taylor's "antiparty' opposition to the Jacksonian commitment to the spoils system and yellow-dog partisanship. In the South, they stressed that he was a Louisiana slaveholder, while in the North they highlighted his Whig-like willingness to defer to Congress on major issues (which he subsequently did not do).

### Results

With Taylor as their candidate, the Whigs won their second and last victory in a presidential election. Taylor won 163 of the 290 Electoral College votes, although the popular vote was much closer: Taylor won only 1,360,099 votes (47%), outvoting Cass, (who won 42.5 of the vote) by 137,933 votes.
A shift of less than 6000 votes to Cass in Georgia and Maryland would have left the electoral college in a 145–145 tie, while a shift of less than 27,000 votes to Van Buren in Connecticut, Maine and Massachusetts would have left both Taylor and Cass short of the 146 electoral votes required to win, forcing a contingent election in the House of Representatives.