Iran's President Hassan Rouhani said on Sunday Muslims must improve the image of Islam, which has been tainted by the violence of extremist groups such as the Islamic State.

"It is our greatest duty today to correct the image of Islam in the world public opinion," state television quoted Rouhani as saying during his speech on Islamic unity in Tehran.

"Did we ever think that, instead of enemies, an albeit small group from within the Islamic world using the language of Islam would present it as the religion of killing, violence, whips, extortion and injustice?" the Iranian president added, according to a Reuters report.

Iran is known as the supreme authority in the Islamic world, and blames Western nations for problems in the Middle East and the subsequent rise of Isis, a Guardian report stated.

"Extremism of groups such as Islamic State stemmed from narrow-mindedness and lack of moderation," Rouhani was quoted as saying by Reuters.

Rouhani also criticised Muslim countries for remaining silent on the killings and bloodshed, especially in Syria, Yemen and Iraq.

Rouhani was instrumental in finalising the country's nuclear deal with world powers in a bid to end crippling economic sanctions on his country, and has reportedly sought to strike a moderate stance compared to his predecessor.

"This agreement sent the message to the world that the most difficult and complex international issues can be resolved through negotiations. Iran's path is a path of moderation," Reuters quoted Rouhani as saying in a speech broadcast on state television in July.