Jimmy Carter served as the 39th U.S. President from 1977 to 1980 as a Democrat. He prioritized human rights in foreign policy and brokered the Camp David Accords between Israel and Egypt. However, his presidency was challenged by stagflation at home and crises abroad including the Soviet invasion of Afghanistan and Iranian hostage crisis, in which 52 Americans were held for over a year until being released on Carter's last day in office. After leaving the White House, Carter founded Habitat for Humanity and won the Nobel Peace Prize for his humanitarian efforts.