Almost 100 soldiers and police officers have been killed, with many wounded according to reports from security officials, who also added that casualties on the Taliban side are similarly heavy.
The Afghan government controls Ghazni, he said, adding there was no threat of collapse from "isolated and disparate" Taliban forces, with Highway 1, the main route from Kabul, open.
The government in Kabul insisted that Ghazni was under its control but residents reported fierce clashes in several districts of the city and streets strewn with corpses.
Mohammad Rahim Hasanyar, a member of the provincial council, said heavy fighting was continuing in several areas of the city and Afghan forces were in defense mode.
Gen. Bahrami said the casualty figures were not yet definite and that the numbers might change.
The Taliban also destroyed a telecommunications tower on Ghazni's outskirts, cutting off all landline and cellphone links to the city and making it hard to confirm details of the fighting.
"Only the governor's office, police headquarters and intelligence agency's compound are in the hands of the government and Taliban are pushing to take them".
"Tactically, operationally and strategically, the Taliban achieved nothing with this failed attack except another eye-catching, but inconsequential headline", O'Donnell said in his statement to CBS News on Monday.
The last time a major urban center was attacked by the Taliban was Kunduz in 2015, which lasted only a matter of days, yet showed cities were not impregnable.
The Ghazni fighting adds to an increasingly fevered political atmosphere ahead of parliamentary elections in October, which have faced widespread concerns over potential security threats from both the Taliban and other armed groups.
Afghan officials said their forces will strike the Taliban from all four sides of the city.
The Western-backed government in Kabul has been struggling to fend off the Taliban and other militant groups since the withdrawal of most North Atlantic Treaty Organisation troops in 2014.
"Medication at the main hospital is reportedly becoming scarce and people are unable to safely bring casualties for treatment", the UN's humanitarian coordinator for Afghanistan said in a statement on Monday. The strikes have killed more than 140 insurgents since Saturday.
The attack comes as pressure continues on the Taliban to enter peace talks with the Afghan government. Taliban and the Afghan government called separate, briefly overlapping, national cease fires in June, and the administration has made its own contact with the Taliban in hopes of nudging them into talks with Kabul. Washington neither confirmed nor denied the meeting, but acknowledged Wells was in Qatar, where the Taliban maintain an office.
Meanwhile, President Ashraf Ghani has ordered more troops to be sent to Ghazni.
In the meantime, the New York Times has reported that USA military commanders are urging Afghan security forces to consolidate their checkpoints by withdrawing from sparsely populated areas. "High profile talks by foreign governments with the Taliban that exclude the Afghan government risk providing too much legitimacy to the Taliban without getting much in return", Wilder said. It also shifted A-10 attack planes and other aircraft from striking Islamic State militants in Syria and Iraq to Afghanistan.
He also said it was "unsafe" for people to travel to larger cities where medical facilities are available.