Zachary Taylor, the 12th President of the United States, served from 1849 until his death in 1850, during which he faced significant challenges related to the expansion of slavery into newly acquired territories following the Mexican-American War. His presidency was marked by his opposition to the Compromise of 1850, which sought to address these issues, reflecting his stance against the extension of slavery despite being a Southern slaveholder himself.