Efforts led by the United States and Israel to isolate Iran suffered a setback on Wednesday when the United Nations announced that Ban Ki-moon, the secretary general, would join officials from 120 countries in Tehran next week for a summit meeting that Iran has trumpeted as a vindication of its defiance and enduring importance in world affairs.

Mr. Ban’s decision to attend the meeting of the Nonaligned Movement, announced by his spokesman, Martin Nesirky, came despite objections from both the Americans and Israelis, including a phone call from Prime Minister Benjamin Netanyahu of Israel. It was announced a few days after the new president of Egypt, a country that has long been estranged from Iran, said he would attend the summit meeting as well, a decision that had already unsettled the Israelis.

Taken together, the moves reinforced Iran’s contention that a reordering of powers is under way in the Middle East, where Western influence is waning, and that the American-Israeli campaign to vilify Iran as a rogue state that exports terrorism and secretly covets nuclear weapons is not resonating in much of the world.

The meeting of the Nonaligned Movement, a group formed during the cold war, includes a number of other countries that the United States has sought to marginalize, among them North Korea and Sudan, whose president, Omar Hassan al-Bashir, is wanted under a war crimes indictment by the International Criminal Court. Although Iran’s hosting of the meeting is strictly a coincidence of history — under a rotating system, Iran presides over the group through 2014 — Iranian leaders have portrayed it as a privilege that repudiates the American narrative.