Defense ministry officials said Ghazni was under complete control of the security forces but at the same time said clearance operations were continuing and additional troops were being sent to boost the city's defense.
"Afghan National Army reinforcements are making their way to Ghazni city to help the Afghan National Police search and clear the city of insurgents that may still be hiding in the city," said Major Mohammad Farooq, Afghan army 203rd Corps spokesman.
A security official, who spoke on condition of anonymity, said both sides were fighting to control commercial centers and arterial roads around the city, which sits on the main highway linking the capital Kabul with the south of the country.
There was little clear information on casualties, but Najib Danish, a spokesman for the interior ministry, said that 25 policemen had been killed, along with one Afghan journalist, whom he did not identify.
Friday's attack on Ghazni came as a shock after hopes had grown of a possible start to peace talks with the Taliban, although the city has been under pressure for months with insurgents increasingly active in nearby districts.
The government had been considering a ceasefire over this month's Eid al Adha holiday to match a similar truce during the Eid al Fitr holiday in June which saw unarmed Taliban fighters mingling with soldiers on the streets of Kabul and other cities.
Taliban spokesman Zabihullah Mujahid said in a social media post that the group had captured Ghazni's main prison and freed many inmates, but Afghan officials could not immediately confirm or reject the statement.
Many telecoms masts were destroyed during heavy fighting on Friday, and contact with the city has been difficult to establish.
"The city was relatively quiet last evening and people were observed moving freely on the streets," Lt Col. Martin O'Donnell, spokesman for U.S. Forces-Afghanistan, said in an emailed statement. "That said, clearing operations are ongoing and we have received reports of sporadic clashes."
He did not say whether U.S. aircraft had conducted any strikes against the Taliban.
Taliban insurgents launched a large-scale attack on Friday, seizing several government buildings and parts of the city center before being pushed back by Afghan forces backed by U.S. aircraft.
The attack followed a similar assault on the western city of Farah in May, when the Taliban came close to taking a major city for the first time since they overran the northern city of Kunduz in 2015 and nearly repeated the feat a year later.
(Reporting by Hamid Shalizi and Ahmad Sultan in Jalalabad; Writing by Rupam Jain; Editing by Hugh Lawson)