Carter successfully pursued the Camp David Accords, the Panama Canal Treaties, and the second round of Strategic Arms Limitation Talks. He also confronted stagflation. The end of his presidency was marked by the 1979–1981 Iran hostage crisis, the 1979 energy crisis, the Three Mile Island accident, the Nicaraguan Revolution, and the Soviet invasion of Afghanistan. In response to the invasion, he escalated the Cold War when he ended détente, imposed a grain embargo against the Soviets, enunciated the Carter Doctrine, and led the 1980 Summer Olympics boycott. In the 1980 Democratic presidential primaries, Carter took the nomination over United States senator Ted Kennedy at the 1980 Democratic National Convention, but then lost the presidential election in a landslide to Republican nominee Ronald Reagan.
Carter left office in 1981 as the only American president to serve a full term in office without appointing a justice to the Supreme Court of the United States. In 1982, he established the Carter Center to promote and expand human rights, which earned him a Nobel Peace Prize in 2002. He traveled extensively to conduct peace negotiations, monitor elections and further the eradication of infectious diseases. 