Protests that shook Iran were not just aimed at the economy, President Hassan Rouhani said on Monday, remarks suggesting the real targets were powerful conservatives opposed to his plans to expand individual freedoms at home and promote detente abroad.

The pragmatic cleric, who defeated anti-Western hardliners to win re-election last year, also called for the lifting of curbs on social media used by anti-government protesters in the most sustained challenge to hardline authorities since 2009.

"It would be a misrepresentation [of events] and also an insult to Iranian people to say they only had economic demands," Rouhani was quoted as saying by Tasnim news agency. "People had economic, political and social demands."

Iran's influential Revolutionary Guards said Sunday the security forces had put an end to a week of unrest fomented by what it called foreign enemies.

The protests, which began over economic hardships suffered by the young and working class, spread to more than 80 cities and towns, and has resulted in 22 official deaths and more than 1,000 arrests, according to Iranian officials

Hamid Shahriari, the deputy head of the judiciary, said all ringleaders of the protests had been identified and arrested, and they would be firmly punished and might face capital punishment.

An Iranian lawmaker confirmed on Monday the death of one detainee in prison.

"This 22-year-old young man was arrested by the police. I was informed that he has committed suicide in jail," Tayebeh Siavashi was quoted as saying by ILNA news agency.

Many of the protesters questioned Iran's foreign policy in the Middle East, where it has intervened in Syria and Iraq in a battle for influence with rival Saudi Arabia.

Argues for social media access

The country's financial support for Palestinians and the Lebanese Shia group Hezbollah also angered Iranians, who want their government to focus on domestic economic problems instead. Rouhani won re-election last year by promising more jobs for Iranian youth through more foreign investment, as well as more social justice, individual freedom and political tolerance – aims questioned by his main challenger in the contest.

Echoing some of his campaign rhetoric, Rouhani said on Monday people should be allowed to criticize all Iranian officials, with no exception.

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

The supreme leader is commander-in-chief of the armed forces and appoints the heads of the judiciary. Key ministers are selected with his agreement and he has the ultimate say on Iran's foreign policy. By comparison, the president has little power.

"No one is innocent and people are allowed to criticize everyone," said Rouhani.

In recent days, photos of anti-government protests have been scarce in part due to a social media crackdown. State-sponsored rallies have taken place as counter protests. Here, An Iranian woman wearing a portrait of Supreme leader Ayatollah Ali Khamenei shouts slogans on Jan. 5 in central Tehran. (Atta Kenare/AFP/Getty Images)

Rouhani also dismissed calls from hardline clerics who had asked the government to permanently block access social media and messaging apps.

As protests have ebbed, the government has lifted restrictions it imposed on Instagram, one of the social media tools used to mobilize protesters. But access to a more widely used messaging app, Telegram, was still blocked. The government has said the restrictions would be temporary.

"People's access to social media should not permanently be restricted. We cannot be indifferent to people's life and business," Rouhani said.

State television showed live pictures of more pro-government rallies in several cities, including Sanandaj in western Iran, as marchers carried posters of Ayatollah Khamenei and chanted slogans in his support.

Iranian Vice-President Masoumeh Ebtekar tweeted on Monday that Rouhani has insisted that all detained students should be released.

Mohammad Bathaei, the education minister, said Monday there were many schoolchildren among the detainees and he was asking for their release before exam season.

Amnesty International said last week that more than 1,000 Iranians had been arrested and detained in jails "notorious for torture and other ill-treatment over the past seven days", with many being denied access to families and lawyers.