A Democrat, Carter served as president from January 1977 to January 1981, years marked by inflation and the Iran hostage crisis.