A woman raises her fist amid tear gas at the University of Tehran

Mass demonstrations have hit towns and cities across Iran in the biggest wave of protests since unrest over a disputed election in 2009.

Sparked by high living costs and the struggling economy, the protests began in second city Mashhad but quickly spread and turned against the Islamic regime as a whole.

Officials have confirmed 12 dead and hundreds arrested, while President Hassan Rouhani has called for calm.

Here is how the protests have unfolded:

- Mashhad -

A few hundred demonstrators gather in Mashhad and several other towns on December 28 to protest high prices after a call reportedly goes out on the Telegram social messaging service.

Videos on reformist media show protesters focusing their ire on the moderate president, but there are also slogans lambasting the entire Islamic regime and Iran's involvement in conflicts around the Middle East.

An official in Mashhad says 52 people were arrested for chanting "harsh slogans" at the rally.

- Trump warning -

The next day, larger-scale protests flare up in more cities including the western city of Kermanshah and key religious centre Qom, where footage shows hundreds of demonstrators chanting "Death to the dictator" and "Free political prisoners".

An official in Tehran says that "less than 50 people" gathered in one of the city's squares as the protests spread to the capital.

First Vice President Eshaq Jahangiri suggests hardline opponents of Rouhani's government may be behind the demonstrations, warning that the protests could slip beyond their control.

The US State Department says it "strongly condemns" the arrest of protesters in Iran and urges "all nations to publicly support the Iranian people".

President Donald Trump wades in on Twitter, insisting that Iranian authorities "respect their people's rights" and warning Tehran that "the world is watching".

- Deadly clashes -

On December 30, regime supporters rally around the country for officially sanctioned demonstrations to commemorate the defeat of the 2009 protest movement.

Interior Minister Abdolrahman Rahmani Fazli calls on the public to avoid "illegal gatherings" as "they will create problems for themselves and other citizens".

The authorities also rebuff Trump's comments insisting that they are "irrelevant" and "opportunistic".

Protests grow in Tehran as scuffles break out at the city's main university. Videos later show demonstrators attacking a town hall, overturning a police car and burning the Iranian flag.

Unverified footage on social media claims to show thousands marching through the western cities of Khorramabad, Zanjan and Ahvaz.

A regional official confirms that two people were killed in clashes in the western town of Dorud during an "illegal protest" on Saturday evening, but insists security forces did not fire on the crowd.

- Deaths as calm urged -

On December 31, Interior Minister Fazli warns that those who "damage public property, disrupt order and break the law" will "pay the price".

Officials say 200 people were arrested during the demonstrations in Tehran and another 80 in Arak, some 300 kilometres (190 miles) away.

In a bid to stall further protests, the authorities block access to online messaging services, including Telegram, that they accuse of helping to spread the protests.

Rouhani finally breaks his silence as he insists people are "absolutely free" to express their anger but "criticism is different to violence and destroying public property."

Despite the call for calm, the deadly unrest continues as videos on social media show demonstrations hitting areas across the country for a fourth night.

Iranian media and officials report that 10 people died in protests overnight -- six in shooting in the western town of Tuyserkan, two shot dead in southwestern Izeh and two more run over by a stolen fire engine in Dorud.

In a second statement on January 1, Rouhani plays down the unrest as "nothing" and insists that the Iranian people will "respond to rioters and lawbreakers".