Zachary Taylor, the 12th U.S. president (from 1849 to 1850), owned slaves throughout his life. As President, he generally resisted attempts to expand slavery in the territories and opposed the Compromise of 1850.