In a clear rebuke to Syria's key ally Iran, Egypt's new president said Thursday that Bashar Assad's "oppressive" regime has lost its legitimacy and told an international conference in Tehran that the world must stand behind the Syrian rebels.

The rallying call by Mohammed Morsi — making the first visit to Iran by an Egyptian leader since the 1979 Islamic Revolution — showed the huge divide between Iran's stalwart support of Assad and the growing network of regional powers pushing for his downfall.

It also drove home the difficulties for Iran as host of a gathering of the 120-nation Nonaligned Movement, a Cold War-era group that Tehran seeks to transform into a powerful bloc to challenge Western influence.

Iran's leaders say the weeklong meeting, which wraps up Friday, displays the inability of the West's attempt to isolate the country over its nuclear program. But Iran has been forced to endure stinging criticism from its most high-level participant as U.N. Secretary-General Ban Ki-moon cited concerns about Iran's human rights record and said Iran's condemnations of Israel were unacceptable.

Morsi's address to the gathering further pushed Iran into a corner. In effect, he demanded Iran join the growing anti-Assad consensus or risk being further estranged from Egypt and other regional heavyweights such as Turkey and Saudi Arabia.

Morsi has proposed that Iran take part in a four-nation contact group that would include Egypt, Turkey and Saudi Arabia to mediate an end to the Syrian crisis. The U.N. chief Ban also said Iran has a key role to play in finding a solution to end Syria's civil war, which activists say has claimed at least 20,000 lives.

But Iran has given no signals of breaking ties with Assad, and the Syrian rebels fighting the regime say they reject Iran's participation in any peace efforts.

"The bloodshed in Syria is the responsibility of all of us and will not stop until there is real intervention to stop it," Morsi said. "The Syrian crisis is bleeding our hearts."

Syrian delegates to the conference walked out during Morsi's speech.

"Morsi's comments violated the traditions of the summit and are considered interference in Syrian internal affairs," Syrian Foreign Minister Walid Moallem, who was heading the Syrian delegation.

He also accused Morsi of "instigating bloodshed in Syria," according to quotes reported by the state-owned Al-Ikhbariya TV. He didn't elaborate.

In another possible dig at Iran, Morsi gave credit to the Arab Spring wave of uprisings that put him in power and touched off the civil war in Syria. Iran has endorsed many of the revolts — describing them as a modern-day reflection of its Islamic Revolution more than three decades ago — but denounces the Syrian uprising as orchestrated by "enemies" that include Saudi Arabia and Turkey.

At the United Nations, Turkey's Foreign Minister Ahmet Davutoglu is expected to urge the Security Council later Thursday to set up a safe zone in Syria to protect thousands of civilians fleeing the civil war. But the initiative is almost certain to meet resistance from Council members such as Russia, which has supported the Assad dynasty for decades.

Morsi's Sunni Muslim Brotherhood backers, Egypt's most powerful political group since the revolt, are opposed to Shiite Iran's staunch backing of the Syrian regime and its lethal crackdown on largely Sunni protesters. Assad is a follower of the Alawite sect, an offshoot of Shiite Islam.

"We should all express our full support to the struggle of those who are demanding freedom and justice in Syria and translate our sympathies into a clear political vision that supports peaceful transfer (of power) to a democratic system," Morsi said in his opening statement.

Morsi slammed Assad's rule, saying that the world had a "moral duty" to stand with the Syrian people in their struggle "against an oppressive regime that has lost its legitimacy."

He said having a democratic system in Syria "reflects the desire of the Syrian people for freedom, justice and equality and at the same time protects Syria from entering into a civil war or being divided by sectarian clashes."

Morsi also called for uniting the fractured Syrian opposition, which has not been able to agree on a clear transitional roadmap for governing the country if Assad should fall. The Egyptian president expressed Cairo's readiness to work with all parties to stop the bloodshed and "agree on a clear vision on which the new free Syria will be based."

He has, in the past, spoken out against international military intervention in Syria.

Egyptian officials had said they did not expect top-level bilateral meetings with their Iranian counterparts during Morsi's visit. However, semiofficial ISNA news agency said Morsi and President Mahmoud Ahmadinejad met later.

Morsi's visit represents a major step toward ending decades of friction between the two countries despite the still-cool rapport.

Tehran cut ties with Egypt following Iran's 1979 Islamic revolution. Under Morsi's predecessor who was ousted, Hosni Mubarak, Egypt sided with Saudi Arabia and other Sunni-dominated Arab states in trying to isolate Shiite-led Iran.

In an attempt at outreach with Iran, Morsi stressed that it is the right of countries to develop nuclear energy for peaceful as long as it adheres to international protocols. The West fears Iran's uranium enrichment could lead to atomic weapons, but Iran has insisted that it only seeks reactors for energy and medical purposes.

The U.N. chief called Iran's nuclear program "top concern" of international community and urged Tehran's "full cooperation" with the U.N.'s International Atomic Energy Agency, which seeks greater access to Iranian sites for inspections.

He also urged all parties — apparently including Israel — to "stop provocative and inflammatory threats; a war of words can quickly spiral into war of violence."

But he added specific censure for Iranian condemnations of Israel. Earlier this month, Iran's Supreme Leader Ayatollah Ali Khamenei said Israel will "disappear from the scene of geography." In his speech Thursday, President Mahmoud Ahmadinejad called Israel a "fake regime."

"I strongly reject threats by any member states to destroy another or outrageous attempt to deny historical facts such as the Holocaust, claiming that another state, Israel, does not have the right to exist or describing it in racist terms," Ban said.

Earlier, Khamenei repeated his claims that Iran has never pursued nuclear weapons — calling use of atomic arms a "big and unforgivable sin" — but also noted it will never give up its work on nuclear technology.

"I declare that the Islamic Republic of Iran has never been after nuclear weapons and it never will abandon its right for peaceful use of nuclear energy" he told the gathering.


Associated Press writers Aya Batrawy in Cairo and Brian Murphy in Dubai, United Arab Emirates, contributed to this report.