An Afghan official says power to Kabul will soon be restored, weeks after insurgents destroyed power cables from Uzbekistan providing electricity to the capital.

Wahidullah Tawhidi, spokesman for the Afghanistan electricity directorate, said on Saturday the military has cleared Taliban-linked fighters from the area of northern Baghlan province where the cables were destroyed.

He says engineers have reconnected some cables and that the work should be completed within five days.

Kabul, a city of almost 5 million, has been without secure power since late January, when militants sabotaged the cables during a military operation to clear them from the region.

The Taliban have been fighting the government for 15 years. Following the drawdown of the international combat mission in 2014, the insurgents spread across the northern provinces bordering Central Asia.