Thousands of people enraged by power cuts during an extreme heat wave rioted across northern India, setting electricity substations on fire and taking power company officials hostage, officials said Saturday.

Officials in Uttar Pradesh said they were trying to purchase power from other states. (Rajesh Kumar Singh/Associated Press)

The impoverished state of Uttar Pradesh has never had enough power for its 200 million people — about the population of Brazil — and many receive only a few hours a day under normal conditions, while 63 per cent of homes have no access to electricity at all.

But recent temperatures that soared to 47 degrees Celsius (117 Fahrenheit) have caused power demand to spike at 11,000 megawatts — far higher than the state's 8,000 MW capacity — triggering blackouts that shut down fans, city water pumps and air conditioners.

Thousands of people stormed an electricity substation Friday near the state capital of Lucknow, ransacking offices and taking several workers hostage for 18 hours until police intervened Saturday morning, state utility official Narendra Nath Mullick said.

Crowds set substations on fire

Elsewhere, an angry crowd set fire to an electricity substation in Gonda, 180 kilometres southeast of Lucknow. It took three hours for firefighters to put out the flames on Friday. Another substation was set on fire in Gorakhpur, 320 kilometres southeast of Lucknow.

Uttar Pradesh Chief Minister Akilesh Yadav said officials were trying to purchase power from other states, though they were also facing shortages amid the extreme heat.

Power was largely restored to most areas by Saturday afternoon, leading dozens of people who were still protesting outside Lucknow's Indira Nagar substation to go home.

Residents had been particularly angry about the power cuts after receiving reliable supplies through the Indian elections, which ended May 16. Since then, only some regions have been guaranteed unbroken power supplies, while others have received little to none.

The High Court in the city of Allahabad is now hearing a petition alleging discrimination in power distribution, and has asked the government to explain why some regions allegedly were receiving preferential treatment. Those regions include the city of Varanasi, the parliamentary constituency of new Prime Minister Narendra Modi, as well as constituencies held by Yadav and other top officials in Uttar Pradesh's ruling party.

Meteorological officials said temperatures would likely remain high through at least Tuesday in Uttar Pradesh, Gujarat, Delhi and other areas of northern India.

"People are advised not to venture out of their homes," said Lucknow-based weather official J.P. Gupta.