President Hassan Rouhani said Wednesday that Iran must listen to protesters behind a recent wave of unrest, hinting that it risked another revolution if their demands are ignored.
In a speech marking the 39th anniversary of the uprising, Rouhani also warned foreign powers that Iran's people would "forever safeguard the Islamic republic".
"As long as people love the culture of Islam and love their Iran and safeguard their national unity, no superpower can change the path of this nation," he said, taking a jab at the United States.
But he said that popular support was at risk if his fellow elites did not listen to protests that have swept the country in recent weeks, and heed the lessons of the 1979 revolution that toppled shah Mohammad Reza Pahlavi.
"All officials of the country should have a listening ear for people's demands and wishes," Rouhani said at the shrine of revolutionary leader Ayatollah Ruhollah Khomeini in southern Tehran.
"The previous regime thought monarchical rule would last forever, but it lost everything for this very reason -- that it did not hear the criticism of the people," he added, flanked by Khomeini's grandson, Hassan Khomeini, a prominent reformist.
Days of angry protests hit dozens of towns and cities over the new year, leaving at least 25 people dead and hundreds in detention.
Recent days have also seen unprecedented protests by a handful of women, posing in public without their headscarves to show their rejection of mandatory Islamic clothing rules.
Rouhani has allied himself with reformists and called for greater civil liberties, including the release of political prisoners, but has achieved little against an entrenched conservative elite that sees protests as subversive attacks orchestrated by foreign enemies.
"No one can stop the great people of Iran from expressing their views, criticism and even protest," he said.
The shah's regime "did not hear the voice of reformers, advisors, scholars, elites, and the educated," said Rouhani.
"It only heard the voice of revolution... and by then, it was too late."
His comments echoed the sharp criticism a day earlier from jailed reformist Mehdi Karroubi, who has been under house arrest for the past seven years for leading protests in 2009.
Karroubi lashed out at supreme leader Ayatollah Ali Khamenei in an open letter, saying major reforms were needed "before it is too late".