Two protesters taking part in demonstrations roiling Iran were killed at a rally overnight, a semi-official news agency reported Sunday, the first deaths attributed to the ongoing protests.

President Donald Trump, meanwhile, dramatically upped his show of support for the economic protests in Tehran, saying the "entire world understands that the good people of Iran want change."

Trump tweeted Saturday that Iran's leaders fear their own people. He said "Oppressive regimes cannot endure forever, and the day will come when the Iranian people will face a choice." He added: "The world is watching!" Trump says that apart from U.S. military power, the Iranian people are what Tehran fears the most.

The entire world understands that the good people of Iran want change, and, other than the vast military power of the United States, that Iran’s people are what their leaders fear the most.... pic.twitter.com/W8rKN9B6RT — Donald J. Trump (@realDonaldTrump) December 30, 2017

In the second tweet, Trump's comment to the UN that "oppressive regimes cannot endure forever, and the day will come when the Iranian people will face a choice" was shown in a video clip and tweeted, followed by the warning that the "world is watching."

Oppressive regimes cannot endure forever, and the day will come when the Iranian people will face a choice. The world is watching! pic.twitter.com/kvv1uAqcZ9 — Donald J. Trump (@realDonaldTrump) December 30, 2017

And on Sunday morning, he tweeted his support for the protesters again:

Big protests in Iran. The people are finally getting wise as to how their money and wealth is being stolen and squandered on terrorism. Looks like they will not take it any longer. The USA is watching very closely for human rights violations! — Donald J. Trump (@realDonaldTrump) December 31, 2017

Trump tweeted again amid his New Year's tweets later Sunday, slamming Iran for shutting down social media amid the protests:

Iran, the Number One State of Sponsored Terror with numerous violations of Human Rights occurring on an hourly basis, has now closed down the Internet so that peaceful demonstrators cannot communicate. Not good! — Donald J. Trump (@realDonaldTrump) December 31, 2017

Anti-government protesters massed again on Sunday afternoon in defiance of a warning by the authorities of a tough crackdown, extending for a fourth day one of the most audacious challenges to the clerical leadership since pro-reform unrest in 2009.

Police in the centre of Tehran fired water cannon to try to disperse demonstrators, according to pictures on social media.

Video posted online also showed a clash between protesters and police in the city of Khoramdareh in Zanjan province in the country's northwest. Reuters was unable immediately to verify the authenticity of the footage.

There were also reports of demonstrations in the cities of Sanandaj and Kermanshah in western Iran as well as Chabahar in the southeast and Ilam and Izeh in the southwest.

Tens of thousands of people have protested across the country since Thursday against the Islamic Republic's unelected clerical elite and Iranian foreign policy in the region. They have also chanted slogans in support of political prisoners.

Demonstrators initially vented their anger over economic hardships and alleged corruption but they took on a rare political dimension, with a growing number of people calling on Supreme Leader Ayatollah Ali Khamenei to step down.

Giving his first public reaction to the protests, President Hassan Rouhani said Iranians had the right to protest and criticise the authorities.

But he warned, according to official media: "The government will show no tolerance for those who damage public properties, violate public order and create unrest in the society."

"People are absolutely free to criticise the government and protest but their protests should be in such a way as to improve the situation in the country and their life."

"Criticism is different from violence and and damaging public properties," he said.

The protests are the biggest since unrest in 2009 that followed the disputed re-election of then-President Mahmoud Ahmadinejad.

Videos showed protesters in central Tehran chanting "Down with the dictator!", in an apparent reference to Khamenei.

Protesters in Khorramabad in western Iran shouted "Khamenei, shame on you, leave the country alone!".

The government said it would temporarily restrict access to the Telegram and Instagram messaging apps, state television quoted an informed source as saying.

An Iranian reached by telephone, who asked not to be named, said there was a heavy presence of police and security forces in the heart of the capital.

"I saw a few young men being arrested and put into police van. They don't let anyone assemble," he said.

In the northwestern city of Khoy, a video showed a protester being arrested by police while a crowd shouted "Police, go and arrest the thieves!". Video on social media showed people in the city of Dorud set fire to a bank building. The authenticity of the video, like others, could not immediately be verified.

Demonstrators also shouted: "Reza Shah, bless your soul." Such calls are evidence of a deep level of anger and break a taboo. The king ruled Iran from 1925 to 1941 and his Pahlavi dynasty was overthrown in a revolution in 1979 by Ayatollah Ruhollah Khomeini, the Islamic Republic's first leader.

Demonstrators have denounced high prices, alleged corruption and mismanagement. Youth unemployment reached 28.8 percent this year.

Economic indexes have improved under Rouhani's government and the economy is no longer in dire straits. However, growth has been too slow for an overwhelmingly youthful population, far more interested in jobs and change than in the Islamist idealism and anti-Shah republicanism of the 1979 revolution.

The demonstrations are particularly troublesome for Rouhani's government because he was elected on a promise to guarantee rights to freedom of expression and assembly.

Rouhani's main achievement is a deal in 2015 with world powers that curbed Iran's nuclear program in return for a lifting of most international sanctions. But it is yet to bring the economic benefits the government promised.

Ali Asghar Naserbakht, deputy governor of Tehran province, was quoted as saying by ILNA news agency that 200 protesters had been arrested on Saturday.

Tehran prosecutor Abbas Jafari Dolatabadi said some of the arrested protesters had confessed "they were carried away by emotions and set fire to mosques and public buildings", and said they would face heavy punishment.

"After giving thousands of martyrs for the Revolution, the nation will not return to dark era of Pahlavi rule," he said.

Police and Revolutionary Guards have in the past crushed unrest violently. These protests could be worry authorities more because they seem spontaneous and lack a clear leader.

And yet analysts say Iran's leaders believe they can count on support from many of the generation that took part as youths in the 1979 revolution because of their ideological commitment and the economic gains they have made under the government.

In apparent response to the protests, the government backed down on plans to raise fuel prices, promised to increase cash handouts to the poor and create more jobs in coming years.

"We predict that at least 830,000 jobs will be created in the new year," government spokesman Mohammad Baqer Nobakht said on state television on Saturday night. He gave no details. Around 3.2 million Iranians are jobless.

Protesters also expressed anger over costly interventions in Syria and Iraq, where Iran is engaged in a proxy war for influence against regional rival Saudi Arabia.

Nikki Haley, U.S. ambassador to the United Nations, said: "The Iranian government is being tested by its own citizens. We pray that freedom and human rights will carry the day."

Rouhani rebuffed Trump's comments, saying he had no right to sympathise with Iranians since he "called the Iranian nation terrorists a few months ago".

Trump refused in October to certify that Tehran is complying with its 2015 nuclear deal and said he might terminate the accord. British foreign minister Boris Johnson tweeted it was vital citizens have the right to demonstrate peacefully.

Protesters have attacked banks and government buildings and burned police vehicles. Two demonstrators were shot dead in the western town of Dorud on Saturday night. The deputy governor of Lorestan province blamed foreign agents for the deaths.