 During his service in New Orleans, Beauregard became dissatisfied as a peacetime officer. He informed the U.S. Army Engineer Department late in 1856 that he was going to join the filibuster with William Walker, who had seized control of Nicaragua; he had offered Beauregard the rank of second-in-command of his army. Senior officers, including general-in-chief Winfield Scott, convinced Beauregard to stay in the United States. He briefly entered politics as a reform candidate for mayor of New Orleans in 1858, where he was promoted by both the Whig and Democratic parties to challenge the Know Nothing party candidate. Beauregard was narrowly defeated.
