Iran imposed an almost complete nationwide internet blackout on Sunday, making one of its most draconian attempts to cut off Iranians from each other and the rest of the world as widespread anti-government unrest roiled the streets of Tehran and other cities for a third day.

The death toll for the three days of protests rose to at least 12 ; hundreds were injured; and more than 1,000 people have been arrested, according to semiofficial news agencies like Fars News.

Ayatollah Ali Khamenei, the supreme leader who has the last word on all state matters, called the demonstrators “thugs” and endorsed the government’s decision to raise prices it sets for rationed gasoline by 50 percent as of Friday and by 200 percent for gasoline that exceeds ration limits. Even after the price hike, gasoline in Iran is still cheaper than in most of the rest of the world — now the equivalent of about 50 cents a gallon.

In a speech on Sunday, Ayatollah Khamenei said he would support rationing and increasing gas prices because heads of three branches of government — the presidency, judiciary and parliament — had made the decision.