Then I found Carter's statement on YouTube. One of the comments is by a "rsharif" (probably Iranian American) who wrote "Thank you Jimmy Carter for removing the Shah of Iran and replacing him with the Islamic republic of Iran." The comment has a rating of +7 even though it makes no sense.
I found this concise summary:
Ever since oil was discovered there in 1908, Iran had attracted great interest from the West. The British played a dominant role there until World War II, when the Soviet Union joined them in fighting to keep the Germans out. Until 1953, the United States mostly stayed on the sidelines, advocating for an independent Iran under the leadership of the young king, Reza Shah Pahlavi. But that year, fearing that charismatic prime minister Mohammed Mossadegh might be moving Iran closer to Moscow, the CIA directed an operation to oust him and consolidate power under the Shah.
With a steady flow of oil from the ground and military equipment from the U.S., the Shah led Iran into a period of unprecedented prosperity. But growing resentment against an uneven distribution of wealth and the westernizing influence of the United States led to a confrontation with Islamic clergy in 1963. The Shah effectively put down the uprising, sending its leader, an elderly cleric named Ruhollah Khomeini, into exile in Iraq. Though no one knew it at the time, Iran's Islamic revolution had begun.
The Iranian Revolution
Fast forward to New Years Eve, 1977: President Carter toasted the Shah at a state dinner in Tehran, calling him "an island of stability" in the troubled Middle East. What the president also knew, but chose to ignore, was that the Shah was in serious trouble. As opposition to his government mounted, he had allowed his secret police, SAVAK, to crack down on dissenters, fueling still more resentment. Within weeks of Carter's visit, a series of protests broke out in the religious city of Qom, denouncing the Shah's regime as "anti-Islamic." The popular movement against the Shah grew until January 16, 1979, when he fled to Egypt. Two weeks later, thousands of Muslims cheered Khomeini's return to Iran after fourteen years in exile.
Did the Carter administration "lose" Iran, as some have suggested? Gaddis Smith might have put it best: "President Carter inherited an impossible situation -- and he and his advisers made the worst of it." Carter seemed to have a hard time deciding whether to heed the advice of his aggressive national security advisor, Zbigniew Brzezinski, who wanted to encourage the Shah to brutally suppress the revolution, or that of his more cautious State Department, which suggested Carter reach out to opposition elements in order to smooth the transition to a new government. In the end he did neither, and suffered the consequences.