Iranian President Hassan Rouhani has addressed the nation for the first time since protests started across the country four days ago.
In a televised speech, Rouhani said that "people have the right to criticise" but not to cause disorder or destroy pubic property.
Iranian citizens are "completely free to express their criticism of the government or stage protests," he said, "in a way that would lead to the improvement of the country's conditions".
However, he warned that authorities would not tolerate antisocial behaviour.
Iran has restricted social media networks that have been used to organise the anti-establishment demonstrations.
State news agency Irib said temporary restrictions on the Telegram and Instagram apps were imposed to "maintain tranquillity".
US President Donald Trump tweeted his support for the protestors, saying "the people are finally getting wise as to how their money and weath is being stolen and squandered on terrorism."
He also warned that "the USA is watching for human rights violations".
President Rouhani fired back at Trump: "This gentleman in America, who is now trying to sympathise with our nation, appears to have forgotten that he called the Iranian nation terrorists several months ago," he said.
"This man, who is an enemy of the Iranian nation from the top of his head to his very toes, has no right to sympathise with Iranians".
Iranian opposition said two demonstrators have been killed by police, but a government official blamed "foreign agents" for the deaths.
Demonstrations started in the north-east as an outcry against economic hardship but turned political in many areas. and saw some people chanting slogans against Supreme Leader Ayatollah Ali Khamenei, President Hassan Rouhani and Iran's foreign policy.
The rallies are the largest to sweep Iran since protests against former President Mahmoud Ahmadinejad in 2009.