In the first days of January, a meme spread through Iran. The image featured Telecommunications Minister Mohammad Jahromi drop-kicking the logos of Tor, an encrypted proxy network, and several social media platforms—a reference to the Iranian government's ban of the messaging service Telegram in response to protests in late December.

On January 4, the meme ended up on the front page of Ghanoon, a newspaper aligned with the country's liberal Reformist movement. The same day, Jahromi reposted it on his Instagram account along with the caption: "The National Security Council—which the Telecommunications Ministry is not part of—has decided, along with other security measures, to impose temporary restrictions on cyberspace in order to establish peace…instead of addressing the roots of the protests and unrest, some are trying to blame cyberspace."

The minister's acknowledgment that the crackdown was ill-advised would foreshadow a reversal in Iranian President Hasan Rouhani's response to the unrest.

As small economic protests encouraged by the Conservative opposition suddenly went nationwide last year, Telegram—used by more than 13 million Iranians—lit up with both credible information and viral rumors. At first, Rouhani's Reformist administration walked the line between defending the right to "criticize and protest" and condemning "solutions to the problems of society in the streets."

Rouhani, who campaigned for re-election last year on the nuclear deal and other pro-trade measures, began his latest term calling for a more open internet. But police eventually detained several hundred people, and at least 21 were killed in street fighting. When the Telegram channel AmadNews encouraged protesters to use firebombs, Jahromi publicly asked the platform's founder, Pavel Durov, to censor the channel. Durov complied, catching flak from Edward Snowden.

Durov refused further requests by Iranian authorities, prompting the "temporary" restrictions on Telegram, which have become known as "The Filtering."

Telegram users responded, as they always do, with memes. The popular channel Talkhand-Siyâsi soon filled up with sarcastic advertisements for air filters and GIFs of former president cum conspiracy theorist Mahmoud Ahmadinejad.

Iran has a well-developed tradition of political caricature dating back to the 1905 Constitutional Revolution. Old-school cartoonists Mehdi Fard and Mohammad Tehani joined the contretemps, mocking Rouhani's promise that "the telecommunications minister's hand shall not touch the 'filtering' button."

The vigorous debate over censorship shows how much Iran—where the elected government often comes into conflict with powerful unelected authorities—has changed in recent years. Increased international trade, electoral victories by Reformists including Rouhani, and a growing number of tech startups have opened up society despite intense pushback from hardline Conservatives in the military and judiciary.

But the reaction to the online censorship was not just a matter of cultural freedom. According to the pro-market newspaper Donya-e-Eqtesad, over 9,000 firms, many of which use Telegram to conduct sales and talk to clients, lost business to the ban. Rouhani himself alluded to the economic damage in a January 8 speech promising social reforms.

In an Instagram post that same day, Jahromi admitted that "we are now in a situation where our sovereign state and other nations of the world do not have the ability to regulate international social networks." Some 25 percent of Iranians use virtual private networks, software that allows people to avoid internet restrictions, he observed.

On January 13, the messaging app was finally unblocked by order of the president. The move came despite the efforts of "hardliners who wanted to force the government to keep the Telegram blocked forever," says Reza Ghazinouri, a refugee and former activist at the University of Tehran who now runs United for Iran, a nonprofit in San Francisco.

Some questioned why the administration had earlier passed responsibility on to the National Security Council, whose members are appointed by both elected officials and religious leader Ayatollah Ali Khamenei. "How can it be that when a matter threatens the state, the decision rests with a security institution," asked an editorial in Tabnak, a newspaper connected to the Iranian military's influential Islamic Revolutionary Guard Corps, "but as soon as the unblocking is announced, to the benefit of the president and the government, they attribute it directly to Hasan Rouhani?"

The December protests have sparked a debate over what Iran's working class wants. The ruling coalition is proposing more liberal reforms as a solution, while hardline Conservatives are calling for a rollback of free market policies. Thanks to the internet's growing influence, the result may be a foregone conclusion.