In this season of new resolutions, Americans would do well to rethink their perceptions of Jimmy Carter. President Carter has suffered the misfortune of having his legacy almost entirely shaped by his political enemies rather than by objective reality or a basic sense of American fairness.

Today, Carter is caricatured as a weak-kneed, sweater-wearing puritan who struggled with lust in his heart, presided over a malaised America, and micromanaged even the scheduling of the White House tennis courts. More recently, he's taken heat for his blunt portrayal of Israeli policies toward the Palestinians.

What an egregiously undeserved reputation. Carter wasn't just a "good man who got in over his head," as critics say. He was in fact quite a good president.

He kept us out of endless wars. He protected the Alaskan wilderness (Sen. Gaylord Nelson (D) of Wisconsin once told me that "Carter was the greatest environmental president the country ever had.") He promoted a visionary energy policy. He countered the Soviet military threat. And since he left office, he has persistently promoted the cause of peace around the world. The landmark Israeli-Egyptian peace treaty he fashioned remains in force today.

Against the backdrop of an unnecessary trillion-dollar war in Iraq, it is instructive to recall how Carter avoided a similar morass when he negotiated the Panama Canal treaties, for which he was excoriated by Ronald Reagan's Republicans. When he left office, he was able to say with Thomas Jefferson "[D]uring the period of my administration not a drop of the blood of a single citizen was shed by the sword of war."

In the public mind, Carter continues to be judged as "ineffectual." Yet he started that treaty ratification process with fewer than 40 votes of the 67 needed. Pentagon generals advised him it would require 100,000 troops, rivers of blood, and untold treasure if the US did not return sovereignty of the canal to Panama.

Carter was keenly aware that retaining US control of the canal, as Reagan demanded, might result in another Vietnam-like conflict. Today, looking at America's open-ended wars in Southwest Asia, Carter should be thanked for his wisdom and vision.

President-elect Obama, take note: No matter how loud the clamor for war, if your instincts tell you it's wrong, remember Carter and don't be stampeded onto unnecessary battlefields.

Carter was truly the prophet without honor in his own land on energy policy. Thirty years ago, he preached conservation and alternative energy. A profligate nation – not to mention Congress and the vested interests – ridiculed him. Today, his ideas are mainstream.

Obama take note: The American public believes it has a constitutional right to cheap gasoline. Even with gas prices topping $4 a gallon in 2008, the bestselling vehicles are still gas-guzzling pickups.

Reagan Republicans disingenuously claimed credit for much of America's long-range military buildup that helped win the cold war. But it was Carter who proposed deployment of 200 MIRVed MX missiles in hardened silos to counter an unbridled Soviet buildup. (Under Reagan, only 50 were actually deployed.) Cruise missiles and the B-2 Stealth bomber technology were also born under Carter.

To the Russians, the most terrifying weapon the Americans ever deployed was the intermediate-range Pershing missile, which had a flight time of 10 minutes to Moscow from NATO bases in Germany. Carter agreed to deploy that weapons system. The irony is that Carter's hawkish leanings later in his administration alienated many in the party of George McGovern and, ultimately, Carter was crippled at least as much by Democratic liberals as by Republicans.

Carter was one of the most brilliant presidents we've ever had. Former Speaker of the House Tip O'Neill wrote that Jimmy Carter was the "smartest public official" he'd ever known. Yet he was portrayed as a Southern bumpkin, and he battled other ugly prejudices. Some Northern Democrats simply could never stomach an openly religious Southern Baptist in the White House. Carter talked like Lyndon Johnson, prayed like Billy Graham, and farmed peanuts in the heart of the old Confederacy. These regional bigotries also colored much of the news reporting. Carter was maligned for events and forces over which a president has little control: inflation fueled by soaring oil prices stoked by the Arabs and OPEC.

Obama take note: American politics is as much about bigotries as it is about issues.

The worst thing about Carter is that he was politically tone deaf. But even that's not true: He simply prized doing what was right over what was popular.

Oh yeah, and that infamous "malaise" speech? He never actually used the word. And his text remains prophetic:

"In a nation that was proud of hard work, strong families, close-knit communities, and our faith in God, too many of us now tend to worship self-indulgence and consumption.... But we've discovered that owning things and consuming things does not satisfy our longing for meaning....

Little by little we can and we must rebuild our confidence. We can spend until we empty our treasuries, and we may summon all the wonders of science. But we can succeed only if we tap our greatest resources – America's people, America's values, and America's confidence."

When we consider the record of the past eight years, Carter's performance – and his vision for America – positively shines. So, let's make a national New Year's resolution: Stop denigrating Carter.

• Walter Rodgers is a former senior international correspondent for CNN.