KABUL, Afghanistan (AP) -- Taliban fighters tried to overrun a provincial capital in Afghanistan early on Friday, hiding inside homes before slipping into city streets in the night to attack security forces and killing at least 14 policemen before being pushed back, officials said.
The overnight attack in the southeastern city of Ghazni, the capital of a province with the same name, also wounded at least 20 members of the security forces, said Baz Mohammad Hemat, the administrator of the Ghazni city hospital.
Another Taliban attack, this one on Thursday night in western Herat province, left six policemen dead in the district of Obe, according to the governor's spokesman there, Gelani Farhad.
The brazen assaults 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.
In Ghazni, the attack began around 2 a.m. with intense gunbattles raging and fires burning in several shops in the city's residential areas, provincial police chief Farid Ahmad Mashal told The Associated Press.
After repulsing the daring assault, police conducted house-to-house searches for any remaining Taliban fighters. An investigation was also underway on how the insurgents had managed to infiltrate so deep into the city, barely 120 kilometers (75 miles) south of the Afghan capital of Kabul.
Hemat, the hospital administrator, said two wounded civilians were also brought to the hospital but that the city was shut down and that ambulances were not being sent out.
Mashal 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.
Several bodies of dead Taliban fighters remained on the street after government forced pushed the insurgents from Ghazni, the police chief said. Bodies of 39 Taliban fighters were recovered from under a bridge on the southern edge of the city.
Airstrikes called in to quash the offensive also killed dozens of Taliban, Mashal said. Defense Ministry spokesman Mohammad Radmanish said the army had helped the police and that the city was brought under control of government forces.
Lt. Col. Martin O'Donnell, a spokesman for U.S. forces in Afghanistan, said American forces and U.S. attack helicopters assisted Afghan troops in pushing back the Taliban during the night's multiple attacks in Ghazni.
"U.S. forces responded with close-air support and conducted one drone strike," O'Donnell said.
Taliban spokesman Zabihullah Mujahid claimed parts of Ghazni had been seized and scores of people killed.
After dawn Friday, Ghazni's residents were staying indoors and all shops in the city remained closed. The road from Kabul to Afghanistan's southern provinces was also closed because it runs through Ghazni.
By mid-morning, sporadic gunfire could still be heard in city, some residents said. There were still Taliban fighters who had hunkered down in elevated positions from which they were still shooting, the residents said, speaking on condition of anonymity for fear for their safety.
The Taliban have so far not confirmed being behind the earlier attack in Herat in which at least six policemen were killed at a district checkpoint.
The insurgents 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.