Bangladesh was hit by a nationwide blackout on Saturday after a transmission line bringing electricity from neighboring India failed, an official from the state power company said.

The blackout was caused by a "technical glitch" and swept across the impoverished and energy-starved South Asian nation at around noon, Masum Beruni, managing director of the Power Grid Company of Bangladesh Ltd., said without elaborating on the cause.

Officials were trying to restore electricity with "powerful generators" while they worked to repair the grid link, said Mir Motahar Hossain, an aide to Beruni.

"Our work is progressing fast, we hope to restore the system to a great extent, if not entirely for now," he said.

Bangladesh began importing electricity from India in October 2013 through a 400-kilovolt transmission line that runs from Baharampur in the Indian state of West Bengal to the town of Bheramara in southwestern Bangladesh.

The country also has signed agreements with energy companies in Japan, China, Malaysia and the United States to build power plants and boost energy infrastructure as it aims to increase its meager 11,500-megawatt generating capacity. More than a third of Bangladesh's 166 million people have no access to electricity.

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