KABUL, Afghanistan (AP) — A brazen and bloody overnight assault Friday by the Taliban on a key provincial capital in central Afghanistan has increased pressure on U.S.-backed Afghan forces that are withering under relentless attacks, prompting President Ashraf Ghani to call an emergency meeting of his security officials.

While government security forces in the city of Ghazni repulsed the multipronged attack with the help of U.S. air support, Taliban insurgents remained hunkered down on its outskirts, and some were still holed up in residential areas, according to Interior Ministry deputy spokesman, Nasrat Rahimi.

At least 39 insurgents were killed, while 14 police died and 20 were wounded in the fighting, said provincial Police Chief Farid Ahmad Mashal. He said the bodies of the Taliban fighters were found under a bridge in the southern part of Ghazni.

Mashal said there were more than 100 other casualties but could not give a breakdown of the dead and wounded.

Among the injured were four Afghan troops who were hurt when their helicopter crash-landed during the fighting, said Defense Ministry spokesman Mohammad Radmanish. The Taliban claimed to have shot it down, Radmanish said it was not clear if the aircraft had been hit or crash-landed for other reasons.

The city of about 140,000 people was in lockdown as residents stayed indoors and reported sporadic gunfire. All shops were closed, they said, as was the highway from the capital of Kabul to Afghanistan's southern provinces that runs through Ghazni.

The Taliban fighters set fire to the local TV building and also destroyed the telecommunications tower, located just outside the city, cutting all cellphone and land line access to Ghazni, said Ali Akbar Kasemi, a lawmaker from the city.

City hospital administrator Baz Mohammad Hemat said two wounded civilians were brought in for treatment. He feared that there were more wounded who could not make it to the hospital because the city was shut down and ambulances were being sent out.

Ghazni is a gateway city linking the heavily Taliban-influenced south and east of Afghanistan to Kabul and is one of the last vestiges of government control in the province of the same name. The Taliban holds sway in most of the province where ethnic Pashtuns live, while the government influence is limited to Ghazni and small pockets dominated by ethnic Hazaras.

"The security situation in Ghazni is under control. Our defense and security forces are in full control of the city," Rahimi said. Still, the Afghan forces were engaged in house-to house battles in some residential areas to root out the remnants of the Taliban's attack force.

Radmanish told The Associated Press the Taliban were driven to an area known as Hasanabad about 500 meters (yards) outside the city. Both the governor's compound and central police compound were under the control of Afghan security forces.

In a statement late Friday, Taliban spokesman Zabihullah Mujahid said the group held control of "several places in the city," while the police chief had fled toward the airport.

To hold onto the city in the fierce, daylong fighting, Afghan forces had to call in reinforcements as well as U.S. air power, including helicopter gunships, fighter jets and a drone strike.

Lt. Col. Martin O'Donnell, a spokesman for U.S. forces in Afghanistan, said American forces and U.S. attack helicopters flew in overnight. As fighting continued throughout the day, he said U.S. forces returned, sending attack helicopters and fighter jets back to the area.

"It is a show of presence," he said.

An investigation was launched to determine how the insurgents had managed to push so deeply into the city, which is only 120 kilometers (75 miles) south of Kabul.

The Taliban have stepped up attacks across the country since NATO and the United States formally ended their combat mission in 2014. U.S. and NATO forces remain in Afghanistan mainly in a supporting and training role in the 17-year-old war.

The Taliban attack came as Ghazni contemplated a cease-fire offer to mark the Muslim holiday of Eid al-Adha later this month. The Taliban have rebuffed offers of negotiations with the government but have held one preliminary round of direct talks with Alice Wells, Washington's top diplomat for South and Central Asia, including Afghanistan.

Since an unprecedented Taliban cease-fire in June to mark the Eid al-Fitr holiday that marks the end of the Muslim fasting month of Ramadan, Taliban insurgents have stepped up attacks in what would appear to be an attempt to dispel hopes of peace that followed scenes of Taliban and Afghan soldiers and police embracing and dancing in the street.

Andrew Wilder, vice president of Asia programs at the U.S. Institute of Peace, said the attack by the insurgents was "a well-timed effort to demonstrate their military power to strengthen their negotiating position prior to another cease-fire and in the event of peace talks."

As the U.S. and Taliban explore the next round of direct talks, attacks like the one Friday on Ghazni are a reminder of the pressure faced by Afghanistan's security forces.

Such attacks could also heighten a sense of urgency in the Trump administration to find a path toward progress with the current approach "before the president pulls the plug and does something more dramatic," said Daniel Markey, director of Johns Hopkins University's Global Policy Program

"His most likely move would be to revert to his earlier preference to more or less pull out of Afghanistan, leaving only a bare-bones counterterror presence, possibly secured by contractors," Markey added.

While he said such a move is probably not imminent, "a few more headlines that show 'his generals' are 'failing' in Afghanistan could produce some personnel moves, and then a policy shift."

Separately from the Taliban, an Islamic State affiliate carried out dozens of deadly attacks in recent years, mainly targeting security forces and minority Shiites.

___

Gannon reported from Islamabad. Associated Press writer Maamoun Youssef in Cairo contributed.

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.