A leading Iranian Sunni Muslim said the execution of Sunni Islamists last week could inflame sectarian tensions in the Gulf region, while Tehran said it was merely taking a tough stance on foreign-backed terrorism.
Iran executed up to 20 Sunni Kurds accused of attacks on security forces. There were no public trials and rights groups said the convictions may have been based on forced confessions.
U.N. High Commissioner for Human Rights Zeid Ra'ad Al Hussein said on Friday that "overly broad and vague criminal charges" had led to "a grave injustice".
Iran's Foreign Ministry expressed surprise at the remarks.
"The Islamic Republic of Iran has always taken forceful policy measures to counter regional terrorist groups supported by foreign countries," ministry spokesman Bahram Qasemi was quoted as saying by state news agency IRNA.
Molavi Abdolhamid, a leading Sunni cleric in Iran said the executions lacked "forethought and tolerance" at a time when Iran and the whole region were suffering from extremism.
"Our main complaint is that the sensitive situation in our region has not been considered in these executions," Abdolhamid, who is regarded as a spiritual leader for Iran's Sunni minority, said on his website.
Iran and the Sunni-ruled Saudi Arabia - the Gulf region's two rival powers - accuse each other of trying to exploit sectarian differences to sow discontent in the other country. In January, Saudi Arabia executed a prominent Shia Muslim cleric along with dozens of Sunni militants, causing outrage in Iran.
Iran has one of the highest execution rates in the world. Amnesty International says at least 977 people were put to death there in 2015, compared to 320 in Pakistan and at least 158 in Saudi Arabia.