Former president Mohammad Khatami

Iran's former president Mohammad Khatami on Tuesday called on authorities to listen to popular demands after a wave of deadly unrest over economic woes.

Authorities "should try to identify people's problems and hardships" instead of "humiliating" them, the reformist said in a statement published online.

He called for "an environment in which people could express their wishes and demands in all security without feeling intimidated" and without undermining the country's stability.

Khatami spoke after deadly protests across the country from December 28 to January 1 over the dire state of the economy during which some demonstrators called for regime change.

Twenty-five people were killed in the unrest, according to the authorities.

Iranian leaders of all political stripes have accused the country's "enemies" of fomenting the unrest.

"The enemy seizes any opportunity" to harm the country, Khatami said, but "all institutions must recognise their share of blame" for the "shortcomings" highlighted by the recent protests, Khatami said.

Despite being barred from public appearances over his role in 2009 protests, Khatami remains one of the most popular figures in Iranian politics.

His endorsement was seen as crucial to President Hassan Rouhani's election in 2013 and 2017.

Rouhani, a moderate who secured a key 2015 nuclear deal with world powers, has pushed for greater civil liberties in the wake of the unrest.

On Tuesday, Rouhani called for "reinforcing democracy and listening to people's opinions" to counter any Western belief that Islam and democracy are incompatible.

The recent protests have exacerbated tensions between Rouhani and ultra-conservatives, who criticise the government's policy of outreach and accuse the president of neglecting the poorest members of Iran's population.