Jimmy Carter has had a long-standing reputation as authoring the most ineffective foreign policy of any modern presidency.

To be honest, Carter deserves better.

When the man from Plains, Ga., moved to 1600 Pennsylvania Ave, he came wearing the anti-establishment headdress. In particular, when it came to foreign and defense policy, Carter promised that his policies would be anything but business as usual.

America, Carter claimed, could do less in the world. So he planned to pull U.S. troops out of Korea. His foreign policy would be based on fostering “human rights” and talking peace instead of war.

From the beginning, however, almost no foreign policy initiative went right. While the Camp David accords eventually led to the 1979 Egyptian-Israeli peace treaty, they did not yield a peace agreement between Israel and the Palestinians, because the Palestinians rejected them from the start. As war rages between Israel and Hamas today, the accords never delivered on the promise of delivering a road map to long-term peace.

Where Carter struggled most, however, was over relations with the Soviet Union. Moscow saw Washington’s post-Vietnam malaise as a clear sign that the American century had ended early. The Soviets went on the offensive in almost every corner of the globe.

The Soviet invasion of Afghanistan galvanized Carter in a manner that has been mostly forgotten. Most Americans recall Carter’s feckless decision to pull the U.S. team out of the upcoming Olympics in Moscow, a self-defeating gesture that accomplished little. But as his presidential term neared its end, Carter apparently decided he was tired of being a foreign-policy doormat for Moscow.

He declared the “Carter Doctrine,” warning the Soviets that he would protect U.S. interests in the Middle East “by force if necessary.” And he ordered the establishment of a rapid deployment force, which would be capable of delivering a massive U.S. military capability into the Persian Gulf.

Further, Carter ordered the development of new generations of military capability and even proposed increasing defense spending, which had been in free-fall since the end of the Vietnam War.

This burst of seriousness didn’t save his presidency. The poor state of the U.S. economy, coupled with the embarrassment of the hostage situation at the U.S. embassy in Tehran, crippled his re-election efforts. Still, Carter left office amid signs that he had learned from his mistakes.

A common joke among conservatives during the 2012 campaign was that if Obama got re-elected, Americans would see what Carter’s second term would have looked like. But Carter might have been a bolder president in his second term. Obama, on the other hand, clearly has not. His second-term agenda has lurched from embarrassment to failure and back again.

Further, Obama has shown no signs of acknowledging that his own policies have contributed much to the reversals he has suffered on virtually every front, from managing Moscow to the mushrooming threat of transnational terrorism.

In no corner of the world had Obama seen more setbacks than in the Middle East. And he is running out of time to clean up his mess before leaving office.

Most of what Obama has broken can’t be fixed. But he could give the next U.S. president a fighting chance by following Carter’s example and doing something.

Reversing the atrophy of American military capabilities would be a start. He could also work to build solid relations with the countries the U.S. will need to build a solid foundation for a Middle East policy. The U.S. needs a string of strong bilateral alliances from Turkey to Jordan, Israel, Egypt, Morocco, Niger, Tunisia, and Algeria to help restore stability to the Middle East and North Africa.

For now, however, comparing Obama to Carter is an insult to Carter.

Originally posted on the Washington Examiner.