Iran's outgoing president has offered a rare apology for the country's most severe summer power outages in recent memory, as blackouts cripple businesses and darken homes for hours a day.

In a government meeting broadcast live on state TV, Hassan Rouhani acknowledged that chronic power outages over the past week had caused "plenty of pain" and expressed contrition in an unusually personal speech.

"My apologies to dear people who have faced these problems and pain," he said.

In recent days, the regular blackouts have spread chaos and confusion on the streets of the capital Tehran and other cities, knocking out traffic lights, shutting factories, disrupting telecommunications and affecting metro systems. Repeaters - devices around cities that enhance mobile phone signals - have failed, along with electronic cash registers.

Some towns in Iran's north reported limited access to water because the power cuts affected the piped supply. Traffic police in the capital said the sudden power cuts have caught officials completely by surprise.

The rolling outages have given Mr Rouhani, a relative moderate who hands the reins to the hardline Ebrahim Raisi in August, one of the last domestic headaches of his presidency.

Footage on social media, shared widely by Farsi-language news channels based outside the country, show popular anger over the blackouts breaking into the open, swelling into scattered protests at local electricity offices and gatherings in paralysed streets.

Officials have blamed the outages on the country's stifling heat, escalating electricity demand and deepening drought that has threatened to halt hydroelectric generation.

Temperatures have soared to more than 41C in Tehran and other major cities. In the country's southern desert, temperatures have hit 50C.

That is driving electricity demand to new heights as Iranians deploy heavy duty air-conditioners against the heat, overwhelming the power grid. Officials have responded with scheduled blackouts multiple times a day.

Power demand has peaked in recent days at 66,000 megawatts, surpassing the country's practical generating capacity of 65,000 megawatts. Companies can provide people with even less electricity, closer to 55,000 megawatts - in large part because the ageing, sanctions-hit electrical infrastructure leaves power plants prone to repeated technical failures.

Last month, Iran's sole nuclear power plant underwent an unprecedented emergency shutdown. The facility in the southern port city of Bushehr returned online over the weekend after engineers said they had repaired a broken generator.