Iran's judiciary chief Ayatollah Sadegh Larijani reacted sharply Monday to comments by President Hassan Rouhani in which he appeared to criticise both the judiciary and some local media.
The media benefits from "a permanent security margin... so that not only can they say whatever they want, but they also sometimes act like the secret police," Rouhani told representatives of around 600 media outlets in Tehran on Sunday.
"You learn from some publications who will be arrested tomorrow, what is going to be closed down tomorrow, which individual's reputation should be damaged," he said.
The most conservative newspapers in the Islamic republic are very vocal in their criticism of Rouhani.
Since being elected in 2013, he has led a policy of openness culminating with the signing in July of a historic nuclear deal with great powers, including the United States.
"The government must be criticised, the judiciary must be criticised, the parliament must be criticised," Rouhani said.
"But criticising does not mean... smearing, insulting or lying."
On Monday, the ISNA news agency said Larijani had come out strongly against the president's remarks.
Signup to our newsletter and follow us on Facebook and Twitter!
"The president made several comments, notably that justice must be a refuge for society, and that if the salt becomes rotten, the task becomes difficult.
"One wonders what he means by that. Could the response be that if the government is rotten and if the president is corrupted that the task becomes difficult?" ISNA quoted Larijani as saying.
"If the meaning is that justice is corrupt this is libellous, if not it is still an insult."
The spat is the first time Rouhani and Larijani have faced off in public.
It comes days after the arrest of four journalists by intelligence officers in the elite Revolutionary Guard who accused them of being "linked to hostile Western governments who were working in the country's media and social networks".
Larijani charged that "some media disrupt the public order... it is not acceptable that some newspapers receive money and work for foreigners against national security".
He also issued a clear warning ahead of February parliamentary elections in which Rouhani hopes to get a majority of moderates and reformers elected to the body currently dominated by conservatives.
Reformist and moderate parties have said they will put forward so many candidates that the Guardians Council will not dare reject all of them.
The conservative-controlled Council has the power to reject candidates it sees as unsuitable.
"The Guardians Council will reject suspicious candidates, be there two thousand of them or ten thousand," Larijani said