At least 14 Afghan policemen were killed and 20 were wounded in the assault on Ghazni, the capital of a province with the same name, provincial police chief Farid Ahmad Mashal told The Associated Press.
The attack first began around 2 a.m. with intense gunbattles raging and fires burning in several shops in the city's residential areas, he said. Fighting continued throughout the day and by mid-afternoon, the Taliban had set the local TV building on fire.
Taliban fighters also destroyed the telecommunications tower, located just outside the city, cutting all cellphone and landline access to Ghazni, according to Ali Akbar Kasemi, a lawmaker from the city.
Afghan troops on the ground called in airstrikes to try quash the offensive.
As evening approached, fighting focused mainly in three directions into the city, said Nasrat Rahimi, deputy spokesman for the Interior Ministry. The Taliban were using people's homes to hide in, making it difficult for security forces to flush them out.
The city was in lockdown as residents reported sporadic bursts of gunfire. Taliban fighters had hunkered down in elevated positions inside Ghazni from where they were shooting, some residents said earlier, speaking on condition of anonymity for fear for their safety.
People were staying indoors and all shops in the city remained closed, they said. The highway from Kabul to Afghanistan's southern provinces was also closed as it runs through Ghazni.
An Afghan military helicopter crash landed in the city during the daytime fighting, and four Afghan soldiers on board were injured, one critically, said Mohammad Radmanish, spokesman for the Ministry of Defense.
The Taliban claimed they had downed the "enemy" helicopter in Ghazni but Radmanish said it was not immediately clear if the helicopter had been hit or crash landed due to other reasons.
Lt. Col. Martin O'Donnell, a spokesman for U.S. forces in Afghanistan, said American forces and U.S. attack helicopters flew in overnight to assist Afghan troops in Ghazni.
"U.S. forces responded with close-air support and conducted one drone strike," he said.
Later, as fighting continued throughout the day, O'Donnell said U.S. forces returned American attack helicopters and fighter jets that had been pulled out back to the area.
"It is a show of presence," he said.
The brazen assault by the Taliban, who have been gaining more ground in their annual spring offensive and who have shrugged off the government's latest offers of a cease-fire and negotiations, underscore the difficulties Afghan forces face in battling the relentless insurgency on their own in efforts to end the nearly 17-year war.
The blitz assault on Ghazni forced Afghan forces to conduct house-to-house searches, looking for Taliban fighters, which was slowing the operation down. An investigation was also underway to determine how the insurgents had managed to infiltrate so deep into the city, barely 120 kilometers (75 miles) south of the Afghan capital of Kabul.
Baz Mohammad Hemat, the administrator of the Ghazni city hospital, said two wounded civilians were also brought in to the hospital. He was worried more wounded could be out there as the city was shut down and ambulances were not being sent out.
Mashal, the police chief, said there were more than 100 other casualties but he could not give a breakdown of the dead and wounded. Most of the casualties were Taliban, he said, and many of their bodies remained on the streets.
In one location, bodies of 39 Taliban fighters were recovered from under a bridge on the southern edge of the city, he said.
Taliban spokesman Zabihullah Mujahid claimed that parts of Ghazni had been seized and that Taliban fighters had killed scores of people. He also told the AP over the phone that Taliban anti-aircraft fire downed the Afghan army helicopter.
In Kabul, shopkeeper Azizullah, who goes only by one name like many Afghan men, said he was frantic with worry for his family in Ghazni after not hearing from them for the past three hours.
"I am so worried what the night will bring and what is going to happen to the city if the Taliban capture it," he said.
Elsewhere in Afghanistan, a Taliban attack Thursday night in western Herat province left six policemen dead in the district of Obe, said the governor's spokesman there, Gelani Farhad.
Mujahid did not comment on the Herat attack.
The Taliban have stepped up attacks across the country since NATO and the United States formally ended their combat mission in 2014, and have seized control of several districts. U.S. and NATO forces remain in Afghanistan mainly in a supporting and training role.
Separately from the Taliban, an Islamic State affiliate has also carried out dozens of deadly attacks in recent years, mainly targeting security forces and minority Shiites.
Associated Press writers Kathy Gannon in Islamabad and Maamoun Youssef in Cairo contributed to this report.