UNITED NATIONS — Egypt’s new president, Mohammed Morsi, assigned himself the heavyweight’s role in the Middle East on Wednesday, declaring in his first speech to the United Nations that the civil war raging in Syria is the ‘‘tragedy of the age’’ and must be brought to an end.
In a wide-ranging address that touched on many major issues confronting the region, Morsi also decried Israeli settlement-building on territory Palestinians claim for a future state and condemned a film produced in the United States that denigrates Islam’s prophet Mohammed.
He urged all UN member nations to join in an effort to end what he called ‘‘the catastrophe in Syria’’ that pits the regime of Bashar Assad against opposition forces trying to end 40 years of dictatorship. More than 30,000 people have been killed in the 18-month conflict.
Morsi has called for Assad to step down and said Wednesday that ‘‘the bloodshed in Syria and the humanitarian crisis that has unfolded must be stopped.’’
Morsi, an Islamist and key member of the once-banned Muslim Brotherhood, opened his remarks to the UN General Assembly by celebrating himself as Egypt’s first democratically elected leader.
Morsi was swept into office after what he called a ‘‘great, peaceful revolution’’ that overthrew Hosni Mubarak’s regime.
Morsi then quickly inserted himself into the thorniest issues in the Middle East, demanding that the United Nations grant membership to the Palestinians, with or without a peace agreement with Israel.
‘‘The fruits of dignity and freedom must not remain far from the Palestinian people,’’ he said, adding that it was ‘‘shameful’’ that UN resolutions aiding the Palestinians are not enforced.
The Palestinians are expected to again ask for UN recognition and formally make an application to the world body in November, after the US presidential election.
When the Palestinians sought recognition last year, President Obama said that Washington would block the move until there was a peace deal with Israel.
The focus of Israeli-Palestinian negotiations, which have been on hold for four years, is a two-state solution that would formally grant the Palestinians the rights of an independent country.
In his bid to end the violence in Syria, Morsi has invited Turkey, Iran, and Saudi Arabia to join a contact group, though the Saudis have not yet participated and the fighting in Syria continues unabated. While Morsi wants Assad to step aside, the Egyptian leader said Wednesday that he opposes any foreign military intervention.
The UN Security Council, which could call for intervention or global sanctions against Syria, is deadlocked because Russia, Assad’s main protector, and China have blocked a series of resolutions sought by Western governments.
Morsi also denounced as an obscenity the anti-Islam video that portrays Mohammed as a womanizer, a child molester, and a fraud.
Morsi insisted that freedom of expression does not allow for attacks on any religion.
He also condemned the violence that swept Muslim countries last week in reaction to the video.
At least 51 people were killed, including the US ambassador to Libya, J. Christopher Stevens, and three other Americans targeted in an attack on the US Consulate in Benghazi.
‘‘Egypt respects freedom of expression. One that is not used to incite hatred against anyone. One that is not directed toward one specific religion or culture. A freedom of expression that tackles extremism and violence. Not the freedom of expression that deepens ignorance and disregards others,’’ Morsi said.
He appeared to have been responding to Obama’s General Assembly speech Tuesday in which the president again condemned the video but sternly defended the US Constitution’s free speech guarantees.
In Cairo, Egyptians watched Morsi’s speech closely for signs of how he would conduct his presidency.
Abdel-Mohsen, a 31-year architect, praised Morsi’s condemnation of the Assad regime but questioned his assertions about free speech.
‘‘How can he talk about freedom of expression when there are many protesters in detention in Egypt, including minors, and when people are locked up for the so-called contempt of religion?’’ she said.
Earlier Wednesday, Iranian leader Mahmoud Ahmadinejad, known for past fiery denunciations of the United States and Israel, spoke at length about his vision for a new world order without the ‘‘hegemony of arrogance.’’
Of Israel, he cited what he termed the ‘‘continued threat by the uncivilized Zionists to resort to military action against our great nation.’’
The US delegation boycotted Ahmadinejad’s speech in response to the ‘‘paranoid theories and repulsive slurs against Israel’’ included in a separate address delivered by the Iranian president on Monday.
‘‘It’s particularly unfortunate that Mr. Ahmadinejad will have the platform of the UN General Assembly on Yom Kippur, which is why the United States has decided not to attend,’’ Erin Pelton, spokeswoman for the US Mission to the UN, said in a statement.
Thousands of protesters in yellow vests emblazoned with photos of Iranian dissidents they said were killed by the Iranian regime gathered outside UN headquarters during Ahmadinejad’s speech. Speakers included former House speaker Newt Gingrich, Representative Carolyn Maloney, Democrat of New York, and former representative Patrick Kennedy, Democrat of Rhode Island.
In his speech on Wednesday, Ahmadinejad did not refer to Iran’s nuclear program. Israel and Western nations contend that Tehran is using what it insists is a peaceful nuclear program as a cover for developing the ability to build atomic weapons.