The Iranian President insisted his people are free to demonstrate in his first comments since two people were killed in anti-government protests - as long as it does not lead to violence.

Hassan Rouhani said his regime must allow "space for legal criticism" - but that "criticism is different to violence and destroying public property".

He also used a cabinet meeting to hit out at US President Donald Trump's comments as the demonstrations entered a fourth day.

On Saturday, US President Donald Trump released a series of tweets warning Tehran to respect freedom of speech.

"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," he wrote.


"Oppressive regimes cannot endure forever, and the day will come when the Iranian people will face a choice. The world is watching!"

On Sunday afternoon Mr Rouhani hit back, saying: "This man who today in America wants to sympathise with our people has forgotten that a few months ago he called the nation of Iran terrorist."

Image: Tear gas appeared to have been fired at protesters at the University of Tehran

Iran has blocked access to Instagram and a popular messaging app used by activists to organise anti-government protests that are sweeping across the country.

The protests are the largest to hit the country in nearly a decade and President Rouhani is due to address the nation later on Sunday.

The protests were organised in part by messages on the Telegram messaging app, which is popular in the country, with images shared on Instagram. Both apps were targeted by authorities.

Iranian state television quoted a source as saying: "It has been decided in the highest security level to restrict access to Telegram and Instagram."

Telegram CEO Pavel Durov wrote on Twitter that "Iranian authorities are blocking access to Telegram for the majority of Iranians after our public refusal to shut down ... peacefully protesting channels."

The governor of Lorestan province, Habibollah Khojastehpour, told state television that two people had been killed.

Image: Pro-regime rallies in Iran

"On Saturday evening, there was an illegal protest in Dorud and a number of people took to the streets responding to calls from hostile groups, leading to clashes," he said.

"Unfortunately in these clashes two citizens from Dorud were killed."

He said "no shots were fired by the police and security forces", and blamed "foreign agents" and "enemies of the revolutions".

Videos appearing to show the bloodied bodies of those said to have been killed has been widely shared on social media, but there has been no independent verification of footage.

A Revolutionary Guards Telegram channel said the deaths had been caused by "people armed with hunting and military weapons" who "entered the protests and started shooting randomly toward the crowd and the governor's building".

Watching events in Iran with concern. Vital that citizens should have the right to demonstrate peacefully. — Boris Johnson (@BorisJohnson) December 31, 2017

The channel also said six people were wounded.

The protests were prompted by discontent over the country's weak economy and alleged corruption.

Speaking on state television early on Sunday, Iranian interior minister Abdolrahman Rahmani Fazli warned protesters.

"Those who damage public property, disrupt order and break the law must be responsible for their behaviour and pay the price," he said.

Many reports of peaceful protests by Iranian citizens fed up with regime’s corruption & its squandering of the nation’s wealth to fund terrorism abroad. Iranian govt should respect their people’s rights, including right to express themselves. The world is watching! #IranProtests — Donald J. Trump (@realDonaldTrump) December 30, 2017

There has been a cautious response to the protests from the West.

The Foreign Secretary Boris Johnson tweeted: "Watching events in Iran with concern. Vital that citizens should have the right to demonstrate peacefully."

The protests originally began in Mashhad, Iran's second-largest city, when hundreds of people took to the streets to protest against high prices.

The unrest then spread to Tehran, and quickly turned against the Islamic regime as a whole.

Police used water cannon in some cases to disperse the crowds.

On Saturday, tens of thousands of government supporters marched in cities across Iran in a show of support for the regime.

Image: There is a growing security presence in Iran's major cities and towns

Many of the marchers carried banners backing Supreme Leader Ayatollah Ali Khamenei.

Some 200 people were arrested.

In 2009, Iran saw eight months of civil unrest when tens of thousands of people took to the streets to protest Iran's disputed 2009 presidential election.