Saudi Arabia's crown prince has called Iran's supreme leader "the new Hitler of the Middle East", amid heightened tensions between the two countries.
Alluding to Iran's growing regional power, Mohammed bin Salman said it was important to avoid a repeat "of what happened in Europe in the Middle East".
In response Iran advised the prince to "ponder the fate of famous dictators".
Saudi Arabia and Iran are rivals and have increasingly accused each other of fuelling instability across the region.
"We learned from Europe that appeasement doesn't work. We don't want the new Hitler in Iran to repeat what happened in Europe in the Middle East," he said, referring to Ayatollah Ali Khamenei.
In a statement, Iranian foreign ministry spokesman Bahram Qasemi accused the "adventurist" crown prince of "immature, inconsiderate, and baseless remarks and behaviour", the semi-official Isna news agency reported.
"I strongly advise him to think and ponder upon the fate of the famous dictators of the region in the past few years now that he is thinking of considering their policies and behaviour as a role model," he said.
Mohammed bin Salman, the kingdom's de facto ruler, has taken a hard line towards Iran since coming to prominence in the past two years.
Earlier this month, he accused Iran of what he said was tantamount to an act of war, blaming it for a missile attack aimed at the Saudi capital, Riyadh, by rebels in neighbouring Yemen.
Iran denied it was involved.
Saudi Arabia - a Sunni Muslim-majority country - and Shia Muslim-led Iran are at loggerheads across the Middle East.
The Saudis accuse Iran of aiding Shia Houthi rebels in Yemen, where a Saudi-led coalition has been fighting a war since 2015. Iran and the rebels have denied the charge. Saudi Arabia has been widely blamed for exacerbating Yemen's humanitarian crisis, which the UN has described as the worst in the world.
Saudi Arabia has also warned against Iran's growing influence in Iraq, where its proxy militias have played a key role in defeating so-called Islamic State, and in Syria, where it has militarily helped President Bashar al-Assad gain the upper hand in the civil war.
Both countries have also accused one another of trying to destabilise Lebanon, where the pro-Saudi prime minister leads a coalition including the Iranian-backed Hezbollah movement.
The prime minister, Saad Hariri, recently announced - then suspended - his resignation, accusing Iran and Hezbollah of sowing strife, while Iran accused Saudi Arabia of engineering the crisis.