ISTANBUL — Leaders and officials of Muslim nations declared East Jerusalem the Palestinian capital on Wednesday at a summit meeting in Istanbul, producing the strongest response yet to President Trump’s decision to recognize the city as Israel’s capital.

The gathering of the 57-member Organization of Islamic Cooperation was held to formulate a unified response from the Muslim world to Mr. Trump’s decision last week. President Recep Tayyip Erdogan of Turkey was the host; the country currently holds the chair of the I.O.C., and Mr. Erdogan has long championed the Palestinian cause.

The meeting condemned in a communiqué Mr. Trump’s “unilateral” and “dangerous declaration” as an effort to change the status of Jerusalem. It said that it considered the action a violation of United Nations resolutions and legally null and void, and that it would hold the United States liable for all consequences of not retracting its decision.

It also said it took Mr. Trump’s declaration as an announcement that the United States was withdrawing from its role as a sponsor of peace for the region.