Iranian President Hassan Rouhani says Muslims should strive towards improving the world's opinion of Islam, which he says has been tarnished by violence.
"We must remove Islam's negative image from today's cyber and real space," he told a conference in Tehran.
Mr Rouhani, a religious moderate, said Islamic principles opposed violence.
In a veiled reference to Saudi Arabia and its Gulf allies, he also criticised nations which had bought US weapons and fired them at fellow Muslims.
Iran is staunchly opposed to the Saudi-led aerial bombardment campaign targeting Shia Houthi rebels who seized control of large parts of Yemen earlier this year.
"How many bombs and missiles have you purchased from America this year?" Mr Rouhani asked. "If you had distributed the money for those bombs and missiles among poor Muslims, nobody would be going to bed hungry."
Addressing a conference on Islamic unity on Sunday, the Iranian president spoke of the shame of watching Muslim children make long, dangerous journeys to seek refuge in non-Islamic countries.
"It is our greatest duty today to correct the image of Islam in world public opinion," he said in the speech that was aired live on state television.
He voiced concern that damage was being done to Islam's reputation by the violence in its heartlands, and urged all Islamic nations in the region to stop the "violence, terror and massacres".
He also condemned Muslim countries for "being silent in the face of all the killing and bloodshed" in Syria, Iraq and Yemen - conflicts in which Iran plays a role.
Iran supports the government of Syrian President Bashar al-Assad, providing soldiers and military expertise in the fight against the rebels and jihadists, including the so-called Islamic State (IS) group. Iran also has close ties to Iraq and condemns IS militants who are fighting both the Syrian and Iraqi governments.
- 20 May 2017