Rouhani, who is on a three-day visit to India, said people who think Islam is a religion of "violence and terrorism" are wrong in their assessment.
He was addressing a Muslim congregation at the historic Mecca Masjid here, after offering Friday prayers.
"If Muslims of the world were united, these countries would not have dared to torture Muslims of Palestine every day," he said, without naming any country.
In early December, US President Donald Trump announced he would break with decades of American policy and move his embassy to Jerusalem. The move stirred global condemnation and protests across the Palestinian territories and the Arab world.
Also Read
The status of Jerusalem is one of the most controversial issues in the Israeli-Palestinian conflict.
In his speech, Rouhani also referred to some of the shooting incidents in educational institutions in the USA, resulting in deaths of people.
The latest one took place on February 14 in a Florida high school, where an expelled former student, armed with a powerful assault rifle, unleashed a hail of gunfire, killing 17 people and injuring 15 others.
The Iranian leader said Muslims have many sects but they should tolerate each other and respect other religions too.
"Though there are many sects such as Shia and Sunni, Muslims should tolerate each other and respect all Muslims and other religions also," he said.
According to him, Muslims should rise above sectarian differences and accept all sects of the community as one.
This was his second visit to Hyderabad and the first after assuming charge as the president of Iran in 2013.
Disclaimer: No Business Standard Journalist was involved in creation of this content