Jimmy Carter's legacy as a former president far outstripped his legacy from his four years in the Oval Office.

He devoted his life to helping others and advancing human rights across the globe.

He created the Carter Center to promote peace and human rights around the world, work for which he won the Nobel Peace Prize in 2002.

His consistent and public work with Habitat for Humanity, building homes for the poor, made the organization a leading charity.

His life was an iconic American one. Born in the rural south, Carter was the first president to be born in a hospital. He attended the Naval Academy and graduated near the very top of his class.

He served on submarines and developed a working expertise with nuclear power.

He became a successful peanut farmer and then governor of Georgia.

He was a born-again Christian who loved the Allman Brothers rock-and-roll band. He lived to be 100, somehow outliving his wife Rosalynn by a year.

Carter was elected president of the United States in 1976 when the nation was reeling from losing the war in Vietnam, the resignation of Richard Nixon, and broad social upheaval.

His image as an uncorrupted farmer and Naval Academy graduate was a welcome relief to American voters who were fed up with Washington and more traditional candidates. He ran as an outsider, with a natural appeal to rural voters and religious groups.

As president, Carter didn't seem to fit into the usual mould.

He pardoned Vietnam war draft evaders on his second day in office, a significant step in healing a national divide. He talked openly about his faith and his struggles with temptation.

He dived into peacemaking activities around the globe, most famously in the Middle East. The Camp David Accords, which Carter brokered between Israel and Egypt, have been the backbone of all Middle East diplomacy for nearly 50 years.

He pursued arms control talks with the Soviet Union, signing the SALT (Strategic Arms Limitation Treaty) II with Leonid Brezhnev, limiting ballistic nuclear missiles in each country.

Despite these significant accomplishments, Carter's legacy as president not well regarded in the United States.

Economic inflation ravaged the United States in the late 1970s and impacted households across from rich to poor. Carter was never able to successfully address the problem.

On foreign policy, his substantial achievements in peacemaking were more than outweighed for many Americans by several failures.

After the Soviet Union invaded Afghanistan in 1980, Carter's response - pulling American athletes out of the Moscow Olympics that summer - was seen as weak, ineffective, and not particularly fair to American athletes.

When his friend, the Shah of Iran, went into exile and sought treatment for cancer in a New York City hospital, radical students in Tehran took over the American embassy and held 51 Americans hostage for months.

A rescue effort ended in tragedy when American helicopters crashed in the desert. The hostage crisis lasted until Carter's successor, Ronald Reagan, was sworn in as president.

Carter's most tortured legacy may be the treaties that turned over the Panama Canal to Panama. The canal was built by the United States decades earlier at great cost of lives and treasure and is critical to America's economy and national security.

Carter felt that giving ownership of the canal to Panama would help US relations across the developing world.

Approved by the US Senate after great persuasive effort by Carter in 1978, the treaties seemed to take a toll on Carter's credibility. As senator Strom Thurmond commented at the time: "The canal is ours, we bought it, we paid for it and we should keep it."

Indeed, Reagan campaigned against Carter on the Panama issue, vowing to abrogate the treaties if he won. (The fact that Reagan did nothing to undermine the treaties during his eight years in office doesn't mean the campaign message wasn't incredibly effective.)

The issue resonates today as President-elect Donald Trump publicly chastises Panama for what he sees as bad management of the canal amidst American competition with China in the Western hemisphere.

In this respect, Carter's presidency greatest significance might be paving the way for Ronald Reagan's ascendant conservatism and America's tougher line on the Soviet Union that led to the end of the Cold War.

More broadly, Carter will be remembered for his uniquely American life story and his demonstrated commitment to his fellow humans.

His post-presidency is the most remarkable of any chief executive in recent memory, and hopefully serves as a model for those who have followed and will follow him in the toughest job in the world.