Heavily armed Taliban fighters attacked the strategic central Afghan city of Ghazni on Friday, burning police checkpoints and seizing control of parts of the centre before being driven back by US-backed forces, officials said.
US attack helicopters and drone aircraft provided government forces with air support. But with Taliban fighters believed to be hiding in residential areas, it was unclear whether the government had full control of the city, with communications badly hit after a number of telecoms installations were destroyed.
The attack on a city straddling the main highway between the capital Kabul and southern Afghanistan was a show of strength for the Taliban, underscoring how volatile the security situation remains less than three months before parliamentary elections in October.
The defence ministry in Kabul said the attackers had been beaten back but were still present in one area of the city and had occupied civilian houses, from where they were still keeping up occasional fire on security forces clearing the area.
It said around 150 attackers had been killed or wounded but gave no estimate of casualties for civilians or security forces. A local health official said at least 16 people had been killed.
A statement from US military headquarters in Kabul said fighting had ceased by 8.00 a.m. (0330 GMT) and Afghan forces had held their ground and maintained control of all government centres.
"US forces responded with close-air support (US attack helicopters) and conducted one strike (drone). In addition, US aircraft conducted a show of presence," Lt Col. Martin O'Donnell, spokesman for US Forces-Afghanistan, said in an emailed statement.
Officials said clashes between security forces and the Taliban started at around 2.00 a.m., forcing the closure of the main highway linking Ghazni to Kabul, 150 km (95 miles) to the northeast.
"The Taliban are dropping missiles near residential and commercial areas. There has not been a single minute of silence for the last eight hours," said a senior government official in Ghazni early in the day.
Local residents said Taliban fighters were walking openly in the streets in parts of the city.
Ghazni police chief General Farid Ahmad Mashal said the Taliban seized several parts of the city, which has been under threat for months, with local officials warning that heavy fighting in surrounding districts showed the city was increasingly vulnerable.

Hopes for peace talks

President Ashraf Ghani held a meeting with top commanders in Kabul to discuss the situation in Ghazni, where the Taliban appear to have repeated the tactics that almost gave them control of the western city of Farah in May.
As helicopters circled overhead in the early morning, a second government official said it was too dangerous for people to venture on to the streets.
"It is not possible to get out of our homes to help the injured or collect bodies," he said.
Taliban spokesman Zabihullah Mujahid issued a statement saying multiple attacks were launched overnight in Ghazni. As many as 140 Afghan soldiers and police had been killed and large quantities of weapons and equipment had been seized, he said.
However, O'Donnell said initial reports indicated minimal casualties among security forces.
"This is yet another failed Taliban attempt to seize terrain, which will result in yet another eye-catching but strategically inconsequential headline," he said.
The attack came amid growing hopes of talks to end 17 years of war in Afghanistan and less than two weeks before the Eid al-Adha festival, when the Western-backed government in Kabul had been considering offering a ceasefire.
In June, a three-day truce over the Eid al-Fitr holiday brought unprecedented scenes of unarmed Taliban fighters mingling with security forces in Kabul and other cities, offering a glimpse of peace and fuelling hopes of negotiations to end the war.
However, even while conducting preliminary discussions with US officials, the Taliban have launched a series of operations that underscored their ability to inflict severe damage on Afghan forces.
Just last week, an attack on an army post in Uruzgan, a province bordering Ghazni, killed dozens of soldiers, adding to what one US report called the "shockingly high" casualties taken ever since NATO ended its main combat mission in 2014.
The Taliban have so far failed to take and hold any provincial centre since they overran the northern city of Kunduz in 2015 before being driven off with the support of US air strikes and Special Forces units.
They came close to repeating the feat in 2016, and in May this year they nearly overran Farah before being beaten back with the aid of US forces.

Related Story