ISTANBUL (Reuters) - Iranian President Hassan Rouhani said on Wednesday all Muslim nations should work together to defend the rights of Palestinians following Donald Trump’s decision last week to recognize Jerusalem as Israel’s capital.

File photo: Iran's President Hassan Rouhani delivers remarks at a news conference during the United Nations General Assembly in New York City, U.S. September 20, 2017. REUTERS/Stephanie Keith

Rouhani, attending an emergency meeting of Muslim leaders, said the U.S. president’s move showed the United States lacked any respect for the legitimate rights of the Palestinian nation.

“Iran is ready to cooperate with all Muslim countries without any precondition to defend the legitimate rights of Palestinians,” Rouhani told the gathering in the Turkish city Istanbul.

“Unity among Muslim countries is very important and Quds (Jerusalem) should become our top priority.”

Opposition to Israel and support for the Palestinian cause have been central to Iran’s foreign policy since the Islamic revolution of 1979 that toppled the U.S.-backed Shah.

Iran, the leading Shi’ite Muslim power, and Sunni Muslim Saudi Arabia are competing for influence in the Middle East, where they support rival groups in Yemen, Syria, Iraq and Lebanon.

Tehran and Riyadh see each other as the paramount threat to regional peace and stability.

Saudi Arabia cut diplomatic relations with Iran in 2016 after Iranian protesters attacked Saudi diplomatic missions in Tehran and the city of Mashhad following Riyadh’s execution of a prominent Shi’ite cleric.

Rouhani said Muslim countries should resolve their disputes through dialogue and he also accused Israel of planting seeds of tension across the Middle East.

On his Twitter account, Rouhani said Trump’s move to recognize Jerusalem as Israel’s capital showed that Washington was not “an honest mediator and never will be”, adding that it only wanted to “secure the interests of the Zionists”.

Iran does not recognize Israel and regards Palestine as comprising all of the holy land, including Israeli territory.

Iranian leaders have repeatedly called for the destruction of Israel. Tehran backs several militant Islamist groups in their fight against Israel.