Sheikh Abdul Rahman Al-Sudais, the imam of the Grand Mosque, made the call while leading the multitude of pilgrims gathered in the plain of Arafat, in prayers after delivering the Hajj sermon on Sunday, reported Arab News.
Prophet Mohammed (SM) had delivered his final sermon more than 1,400 years ago at the Arafat plains.
More than 100,000 of them are Bangladeshis.
This year, pilgrims from Iran were unable to attend the Hajj, after talks between the Shia-dominated Persian Gulf nation and the Sunni-majority Kingdom on arrangements to run the annual pilgrimage broke down in May.
After the stampede that killed nearly 800 pilgrims last year, both nations had blamed each other for the disaster, one of the deadliest to befall the annual Muslim rite in decades.
Responding to his remarks, Saudi Arabia's Grand Mufti Sheikh Abdulaziz Al al-Sheikh said he was not surprised at Khamenei's comments, and that Iran's leaders were not Muslims.
The Arab News report said Imam Sheikh Abdul Rahman, who filled in for Sheikh Abdulaziz who opted out due to health reasons, on Sunday asked the pilgrims to avoid politics during the Hajj.
He urged the media to do responsible reporting by avoiding 'sensationalism and rumours'.
He said 'terrorism does not belong to any religion or nation'.
Though he did not deliver the sermon this year, Grand Mufti Abdulaziz attended it with Makkah Governor Prince Kahlid Al-Faisal.
The final rituals of the Hajj started on Saturday, when pilgrims gathered at Mina where they spent the day and night in prayers before heading to Arafat on Sunday morning.
Pilgrims spent the day at the Arafat plains - the most important ritual without which the pilgrimage is considered invalid - in prayers.
After sunset, the pilgrims left Arafat and headed to nearby Muzdalifah to stay overnight, where they will also collect pebbles for the next phase of the pilgrimage - the symbolic stoning of the devil represented by three pillars in Mina.
They will move back to Mina after on Monday morning for the stoning, a ritual that lasts three to four days, and for sacrificing animals to celebrate the beginning of the Eid-ul-Azha.