Pierce was born in New Hampshire, and served in the U.S. House of Representatives and the Senate until he resigned from the Senate in 1842. His private law practice was a success, and he was appointed New Hampshire's U.S. Attorney in 1845. The incumbent carried New Hampshire but lost the national vote to William Henry Harrison, the military hero, whose Whigs took a majority of seats in the Twenty-seventh Congress. Harrison died after a month in office, and Vice President John Tyler succeeded him. Pierce and the Democrats were quick to challenge the new administration, questioning the removal of federal officeholders, and opposing Whig plans for a national bank.