Bangladesh has been struggling to restore power hours after a transmission line bringing electricity from neighbouring India failed, causing a nationwide blackout.

The blackout swept across the impoverished and energy-starved country at around noon on Saturday.

The transmission line experienced a "technical glitch" that led to a cascade of failures throughout the national power grid, with power plants and substations shutting down, said Masum al-Beruni, managing director of the state-run Power Grid Company of Bangladesh.

Officials said it would take at least 12 hours to repair the system and restore power to the capital Dhaka, a city of more than 10 million people, the AP news agency reported.

This is terrible. We had some confidence in the government over last few years that the power sector was improving slowly. But what is this? Mohammad Hasan, resident of Dhaka's upscale Bashundhara neighbourhood

Al Jazeera's Tanvir Choudhury, reporting from Dhaka, said the government has deployed additional security forces because of a "major concern" about security in the city.

"The capital city is totally black," Choudhury said, noting residents are unclear as to what caused the massive outage.

The Power Grid Company restarted some power plants and restored electricity to some areas of the country for a few hours on Saturday afternoon.

But the plants were not operating normally and had to be shut down again, two power company officials told AP on condition of anonymity.

Dhaka's hospitals and the international airport were continuing to operate, with emergency generators supplying power. But many offices normally open on Saturdays had to send their employees home.

"This is terrible," said Mohammad Hasan, a resident of Dhaka's upscale Bashundhara neighbourhood.

"We had some confidence in the government over last few years that the power sector was improving slowly. But what is this?"

Energy-poor nation

As night fell, most of Dhaka remained dark, although officials said they had restored some power to strategic buildings, including major government hospitals, the president's house and the prime minister's residence.

An aide to Beruni said technicians were working to restore the link with India.

"Our work is progressing fast. We hope to restore the system to a great extent, if not entirely," Mir Motahar Hossain told AP.

Last year, Bangladesh started to import electricity from India through the 400-kilovolt transmission line, which runs from Baharampur in the Indian state of West Bengal to the town of Bheramara in southwestern Bangladesh.

Bangladesh is considered one of the most energy-poor nations, with one of the lowest per capita electricity consumption rates in the world.

More than a third of Bangladesh's 166 million people still have no access to electricity, while power outages blamed on inefficient and dated grid infrastructure, as well as poor management, are common.

Saturday's blackout was the country's worst since 2007, when a powerful cyclone that killed about 2,500 people knocked out the national grid for several hours.

RP Sasmal, head of operations at India's Power Grid company, told the Reuters news agency there were no problems on that side of the border.