Beirut: Iranians have political, economic and social demands which must be heard, President Hassan Rouhani said Tuesday, one of his clearest statements of the right to air grievances since demonstrations were put down violently in December and January.

"People have criticism and objections on the economic issue and they have a right. But the objections aren’t only economic. They also have something to say about political and social issues and foreign relations,” Rouhani said at a televised news conference.

"Our ears must be completely open to listen and know what the people want. The government is trying to solve the problems with all its power.”

In late December, demonstrations which began over economic hardship spread to more than 80 Iranian cities and towns.

At least 25 people died in the ensuing unrest, the biggest expression of public discontent since nationwide protests in 2009.

Demonstrators initially vented their anger over high prices and alleged corruption, but the protests also took on a rare political dimension.

Judicial officials announced more than 1,000 arrests around the country.

Mahmoud Sadeghi, a member of parliament, said last month that at least 3,700 people had been detained.

A judiciary official announced in mid-January that 440 people who had been arrested during the protests had been freed.

At his news conference, Rouhani said the youth were now the majority in Iran and have a right to speak out.

Blocking websites and confiscating satellite dishes will not stop the flow of information, Rouhani said.

"Today we have accepted protest and luckily all the authorities in the country have accepted the principle of protest,” Rouhani said, an apparent reference to a rare statement by Khamenei last month that people have a right to air legitimate concerns.

Separately, Rouhani said that Iran would not pull out of a landmark 2015 agreement with world powers under which Iran agreed to curbs on its nuclear program in exchange for the lifting of most international sanctions. He also said the deal cannot be renegotiated.

US President Donald Trump, long a critic of the deal reached by his predecessor Barack Obama, has so far stopped short of pulling out of it, but has told European allies and Congress they had to work with him to change it or he would withdraw from it.

"A mistake made by Mr Trump is that he thinks the nuclear agreement is an agreement with the Democratic Party,” Rouhani said.

"The nuclear agreement is with the American government regardless of which party is on top.