Andrew Jackson carried Pennsylvania by overwhelming margins in each of his two previous campaigns in 1824 and 1828. Due to the unpopularity of the National Republican Party in the state, the new Anti-Masonic Party took the leading role in opposition to Jackson in Pennsylvania. They nominated former United States Attorney GeneralWilliam Wirt for president at their 1831 national convention in Baltimore. As their own candidate, Henry Clay, stood little chance to carry the state, Pennsylvania's National Republicans chose to cross-endorse Wirt and the Anti-Masonic candidates rather than risk dividing Anti-Jacksonian voters and allowing Jackson to win by a plurality.[1]
The result of the October gubernatorial election encouraged the Anti-Masons, as their candidate, Joseph Ritner, came within 3,000 votes of defeating the Jacksonian nominee. However, in the November presidential election, Jackson handily defeated the "Union ticket" of the Anti-Masons and the National Republicans by a margin of 15 percent. As the intended nominee of the Union ticket, Wirt polled his greatest share of the vote in any state, in spite of his failure to carry Pennsylvania; national partisan polarization hurt the Union ticket, as many German Jacksonians who supported Ritner for governor were unwilling to vote against Jackson in the presidential election. The victorious Democratic electors voted for Jackson as president and William Wilkins as vice president, the state convention having refused to ratify the nomination of Jackson's national running mate, Martin Van Buren.[2] It was also the last time to date Union County, Pennsylvania voted Democratic.