Carter's presidency was marked by several major crises, including the takeover of the American embassy and holding of hostages by students in Iran, a failed rescue attempt of the hostages, serious fuel shortages, and the Soviet invasion of Afghanistan.
His administration created two new cabinet-level departments: the Department of Energy and the Department of Education. He established a national energy policy,[2] removed price controls
from domestic petroleum production,[3] but was unable to make the USA less reliant on foreign oil sources. In foreign affairs, Carter pursued the Camp David Accords, the Panama Canal Treaties and the second round of Strategic Arms Limitation Talks (SALT). Carter advocated a policy that held other countries to the highest moral standard possible, a standard by which, he believed, Americans would want themselves to be judged.[4] The final year of his term was dominated by the Iran hostage crisis, during which the United States struggled to rescue diplomats and American citizens held hostage in Tehran. By 1980, Carter was so unpopular that he was challenged by Ted Kennedy for the Democratic Party nomination in 1980. Carter received the Democratic nomination, but lost the election to Republican Ronald Reagan.
After leaving office, Carter founded an institute to promote global health, democracy and human rights. He has traveled extensively to monitor international elections, conduct peace negotiations and establish relief efforts[citation needed]. He is also a key figure in Habitat for Humanity.[5] Carter also became a prolific author, writing 27 books. As of 2008, he is the earliest living president and the second-oldest living president.