Diplomacy by rote has its pitfalls. The UN Secretary General has regularly attended the Non-Aligned Movement (NAM) summits, hosted every three years by the incoming chair. Iran, elected with no objections from any of the other 119 NAM members, will welcome Ban Ki-moon to Tehran next week.

Despite previous custom, Ban did not have to accept the Iranian invitation. This regime, after all, has consistently disrespected him and the world body. He should have exercised moral authority as head of the United Nations and set a profound example by declining.

Iranian President Mahmoud Ahmadinejad, who will host the conference and then serve as NAM chair for the next three years, has masterfully played the international diplomatic chess game. Iran has ignored UN Security Council resolutions and International Atomic Energy Agency (IAEA) warnings about its nuclear program, and has managed so far to withstand the economic sanctions imposed by the UN, U.S., European countries and others.

On the same day that Ban confirmed he will go to Tehran, IAEA Director Yukiya Amano expressed serious doubts that Iran would open certain sites to inspection. The IAEA last November confirmed in a scathing report that Iran is indeed on a path to achieve the capacity to build nuclear weapons. Three rounds of Iranian talks with the five Security Council permanent members and Germany failed to move Iran from its firmly unyielding stance.

Moreover, just as Ban was confirming his travel plans, one of the Secretary General’s staff told the Security Council that Iran has definitely been supplying weapons to Syria, in violation of UN resolutions banning Iranian arms exports.

Ban’s spokesman explained that the UN chief will reinforce, during meetings with Iran’s leaders, his concerns about Iran’s nuclear program, support for the Assad regime, and threats to annihilate Israel.

Iran, however, has demonstrated time and again that it is impervious to any criticism. The day after Ban condemned Iranian leaders for threatening Israel, calling Supreme Leader Ayatollah Khamenei’s remarks “offensive and inflammatory,” they did it again.

Don’t count on NAM members walking out when Iranian leaders condemn and threaten Israel.  Few, if any, have ever left the halls of the UN or other international fora when Ahmadinejad spoke. Those disapproving with their feet were mainly representatives of the U.S. and some EU countries, and none of them will be in Iran.

The NAM, for many Americans, is an esoteric artifact of the Cold War era. The focus in the U.S. will be on Tampa, as the Republican National Convention, coincidentally, will overlap with events in Tehran. And soon after the Democratic National Convention, Ahmadinejad will arrive in New York to address the UN General Assembly as both Iran’s president and the head of NAM, the largest voting bloc in the General Assembly.

Whoever wins on November 6 will need to deal with the Iranian nuclear threat. Thus, President Obama and Governor Romney should reiterate emphatically their pledges that all options for stopping Iran are on the table. And Washington will also need to continue asserting America’s moral authority in confronting Iran’s vituperative threats against Israel.