Taliban insurgents held on to parts of the key city of Ghazni for a third day, putting up scattered resistance as Afghan forces backed by US airstrikes worked to clear them out.
The eastern city was overrun by hundreds of insurgent forces in the Taliban's latest attempt to capture an important urban target.
Most communication with the city of 250,000 was cut off, and Taliban fighters were described as attacking key government buildings and taking over homes and shops in various neighbourhoods.
Insurgent forces were said to have mined and set up checkpoints on the nearby highway, which links Kabul with the southern tribal region that is the Taliban's home turf.
An army official in Kabul, Sharif Yaftali, told journalists that "strategic and key areas" of Ghazni are under control of the government but that insurgents had taken cover in populated areas, slowing efforts to drive them out. He said officials hope to restore security and reopen the highway within two days.
A US military spokesman said that American aircraft had conducted five airstrikes yesterday and 10 today.
Lieutenant-Colonel Martin O'Donnell said in a statement that Afghan troops had "strongly and swiftly reinforced" the city and "continue to hold their ground and maintain control of all government centres" while clearing operations continued.
The sustained onslaught by hundreds of Taliban fighters is similar to several previous attacks on major cities, especially a 2015 assault on Kunduz in the north and an attack in May on Farah city in the west. Both were retaken by government forces after heavy fighting, but the near-takeovers by the Taliban gave the insurgent group a psychological boost.
The Ghazni attack appears to be a well-orchestrated and high-profile challenge to the Government and its US supporters.
It has come despite recent Afghan and US efforts to promote peace talks and build on a successful three-day ceasefire in mid-June. Officials had hoped for a second truce later this month during the Eid al-Adha holiday, but that seems unlikely.