Iran's Press TV said the pro-government rallies were to "protest the violence that has taken place over the last few nights in cities".

Pictures emerging from the country showed demonstrators waving Iranian flags and photos of President Hassan Rouhani.

Others waved banners emblazoned with the words "down with USA" after President Donald Trump hailed anti-government protesters and tweeted: "The people of Iran are finally acting against the brutal and corrupt Iranian regime."

"All those who are at odds with the Islamic Republic have utilised various means, including money, weapons, politics and (the) intelligence apparatus, to create problems for the Islamic system, the Islamic Republic and the Islamic Revolution."

He said he would elaborate on his comments in the coming days as he avoided identifying specific countries.

The unrest has seen Tehran shut down messaging app Telegram and photo-sharing platform Instagram to try to clamp down on the protests.

They join Facebook and Twitter in being banned in the country.

The US has condemned the move.

Sources in the office of Tayyip Erdogan have since said President Rouhani expects the protests in Iran to end in the next few days following a phone call with the Turkish leader.