Answer
Franklin Pierce was appointed as New Hampshire's U.S. Attorney in 1845. He held this position before participating in the Mexican-American War as a brigadier general in the United States Army. Pierce's military service and political background made him an attractive compromise candidate for the Democratic Party in the 1852 presidential election.