KABUL, Afghanistan — United States airstrikes have helped to break a bloody impasse between Afghan troops and Taliban militants north of Kabul, allowing repair crews to reach downed power lines and restore electricity to the capital after more than three weeks of disruption, an Afghan official said on Tuesday.

The transmission lines connecting Kabul to hydroelectric generators in Uzbekistan were first cut on Jan. 27, depriving the capital of its most important supply of electricity. The government accused the Taliban of destroying pylons that support the cables, though the militants denied doing so.

What was not in doubt was that the repair crews could not reach the area because of mines, booby traps and fighting between the Taliban and a large Afghan National Army force that was sent last month to reclaim the area from insurgent control.

Power to Kabul and other affected regions was restored late Monday.

The supply of electricity to the capital by Afghanistan’s national power company, known as DABS, is never enough to meet demand, even at the best of times. But the loss of the Uzbek lines, and a separate attack that cut the electrical supply from Tajikistan, had left much of the capital without power through several winter weeks.

The United States’ action ensured that the lights were on in Kabul in time for a meeting on Tuesday of a four-nation group that is working to restart the Afghan peace process. The so-called Quadrilateral Coordination Group, made up of diplomats from Afghanistan, Pakistan, China and the United States, issued a statement after the discussions inviting the Taliban and other antigovernment groups to meet with representatives of President Ashraf Ghani in the Pakistani capital, Islamabad, by the first week of March.

Requests for comment from a Taliban spokesman were not immediately answered.

Mr. Ghani has sought to negotiate a way out of the conflict, but he has little to show for his efforts. He was humiliated last year when, just days after what had seemed to be a breakthrough meeting between Taliban delegates and Afghan government envoys in Pakistan, officials announced that the Taliban’s supreme leader, Mullah Muhammad Omar, had died more than two years earlier.

In addition to costing Mr. Ghani significant political support at home, the revelation exposed deep differences within the Taliban over whether to support peace talks. It also led some commanders to break away completely, which could complicate the new peace effort.

The pace of the antigovernment violence has, if anything, intensified. Afghan forces have been on the defensive for months in the opium-growing heartland of southern Helmand Province.

The insurgents have also maintained a high pace of random mayhem. On Monday, a Taliban suicide bomber targeted an Afghan Local Police unit in the Seya Gerd district of Parwan Province, killing 14 people, including six police officers, and wounding 11, said Wahid Sediqy, a provincial police spokesman.

Davood Moradian, director general of the Afghan Institute for Strategic Studies and an adviser to former President Hamid Karzai, expressed pessimism that anything would come of the talks, saying that China and the United States had pressed Pakistan and Afghanistan to talk with the insurgents, but that “they won’t deliver on substance.”