KABUL, Aug 14 (AP) — The Taliban seized two more provinces on Saturday and approached the outskirts of Afghanistan's capital while also launching a multi-pronged assault on a major northern city defended by former warlords, Afghan officials said.

The insurgents have captured much of northern, western and southern Afghanistan in a breakneck offensive less than three weeks before the United States is set to withdraw its last troops, raising fears of a full militant takeover or another Afghan civil war.

The Taliban captured all of Logar province, just south of the capital, Kabul, and detained local officials, said Hoda Ahmadi, a lawmaker from the province. She said the Taliban have reached the Char Asyab district, just 11 kilometers (7 miles) south of Kabul.

The insurgents also captured the capital of Paktika, bordering Pakistan, according to Khalid Asad, a lawmaker from the province. He said fighting broke out in Sharana early Saturday but ended after local elders intervened to negotiate a pullout. He said the governor and other officials surrendered and were on their way to Kabul.

The Taliban meanwhile attacked the northern city of Mazar-e-Sharif from several directions, setting off heavy fighting on its outskirts, according to Munir Ahmad Farhad, a spokesman for the provincial governor. There was no immediate word on casualties.

The Taliban have made major advances in recent days, including capturing Herat and Kandahar, the country’s second- and third-largest cities. They now control 19 of Afghanistan’s 34 provinces, leaving the Western-backed government in control of a smattering of provinces in the center and east, as well as Kabul and Mazar-e-Sharif.

Afghan President Ashraf Ghani delivered a televised speech on Saturday, his first public appearance since the recent Taliban gains, in which he vowed not to give up the “achievements” of the 20 years since the U.S. toppled the Taliban following the 9/11 attacks.

The U.S. has continued holding peace talks between the government and the Taliban in Qatar this week, and the international community has warned that a Taliban government brought about by force will not be accepted. But the insurgents would appear to have little interest in making concessions as they rack up victories on the battlefield.