KABUL, Afghanistan — The Taliban have sabotaged a major power line in the northern province of Baghlan, officials said on Wednesday, cutting a supply of electricity from Uzbekistan to Kabul, the Afghan capital, and exposing a vulnerability in the nation’s rickety infrastructure at a time when the insurgency has government forces thinly stretched.

Wahidullah Tawhidi, a spokesman for the national power company, Da Afghanistan Breshna Sherkat, said insurgents destroyed one electricity transmission tower and damaged two others late Tuesday in the area of Dand-e-Shahabuddin, near the highway that links Baghlan and Kunduz Provinces. Utility workers reached the area not long afterward, he said, but could not begin repairs until Afghan security forces had dismantled mines left by the insurgents and secured the area. He predicted that service would be restored on Wednesday.

Baghlan Province lies between Kabul and Kunduz, the northern city that the Taliban seized and held for 15 days last autumn. The sabotage of the line also hit Parwan, Nangarhar and Laghman Provinces. It marked the first time that militants had targeted the capital’s electricity supply. But such incidents have been rife elsewhere in the country.

For example, more than 2,000 times last year, insurgents cut cables or damaged transmission towers linking the Kajaki Dam, one of the country’s most important generators of hydroelectric power, to consumers in the southern provinces of Helmand and Kandahar, Mr. Tawhidi said.

Mr. Tawhidi said the Uzbek line provided about 280 megawatts of electricity, making it the largest source of the capital’s power. The Afghan power company has been able to make available about 75 megawatts to Kabul from its backup facilities.

The Taliban attack came as Afghan security forces were fighting to clear insurgents from the Dand-e-Ghori area of Pul-i-Khumri, Baghlan’s capital. Zabiullah Shuja, a spokesman for the provincial police, said the offensive had begun early Tuesday. Eighteen militants were killed and at least seven were wounded, he said, and fierce fighting was continuing. Two police officers were also killed and another was wounded, Mr. Shuja said.

The insurgents, who have kept government forces off balance since the United States and its NATO allies ended their combat mission at the end of 2014, control much of Baghlan Province. The government is determined to maintain its authority over the strategic region, without which troops, supplies and goods cannot move freely between Kabul and Kunduz.

The unrest in the north is arguably not the worst of the government’s problems at the moment. Helmand Province, in the south, has been under siege for months, and officials say that only the timely dispatch of Afghan and American special forces kept it from completely falling under Taliban control toward the end of 2015.

On Wednesday morning, insurgents attacked a demining team in Nawabad village in the Greshk district of Helmand Province, killing at least three people, said Mohammad Ismail, the district police chief. He said the police quickly scattered the insurgents after a 30-minute gun battle. Had the police not arrived, he said, the insurgents would very likely have killed or kidnapped all of the deminers, employees of the Demining Agency for Afghanistan.