KABUL (Reuters) - Taliban insurgents attacked police headquarters and other government buildings in Ghazni in central Afghanistan on Sunday, killing dozens of soldiers and police and threatening to seize control of the city, officials and residents said.

Afghan security forces keep watch at a checkpoint on the Ghazni highway, in Maidan Shar, the capital of Wardak province, Afghanistan August 12, 2018. REUTERS/Mohammad Ismail

U.S. aircraft conducted at least four air strikes but details of the fighting were unclear as most of the city’s telecoms masts were destroyed in fighting over recent days.

A senior official, who spoke on condition of anonymity because he was not authorized to speak to the media, said around 80 members of the security forces, as well as an unknown number of civilians had been killed.

Mohammad Sharif Yaftali, Afghan army chief of staff, said the city was not under threat of collapse and heavy fighting was underway to push back the Taliban from the city limits.

“Strategic locations and centers in the city are under the control of Afghan forces and the Taliban are hiding inside people’s homes and shops and resisting,” Yaftali told reporters at a news conference in Kabul.

But lawmakers from Ghazni who managed to talk to some residents said the Taliban were in control of much of the city after launching an initial attack in the early hours of Friday.

“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,” said Chaman Shah Ehtemadi, a lawmaker from Ghazni.

The attack, the heaviest blow struck by the Taliban since they came close to overrunning the western city of Farah in May, dampened hopes of peace talks which had grown since a surprise three-day truce during the Eid al-Fitr holiday in June.

Taliban spokesman Zabihullah Mujahid said the insurgents had taken the district center of Khwajaumari, north of the city, and several areas in other districts of Ghazni province. Many members of the security forces had surrendered, he said.

Slideshow ( 2 images )

Local officials have warned for months that Ghazni, a city on the main highway linking Kabul with Afghanistan’s south, was under threat, with the Taliban in control of most of the surrounding province.

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.

“No one knows what the exact situation is because there is no communication service,” he said.

“FIRE AND DEAD BODIES”

With the highway heavily mined to prevent reinforcements from arriving, residents were largely trapped inside but some who managed to escape across fields on the city’s periphery said many government buildings were ablaze.

“There was burning and fire and dead bodies everywhere in the city,” Abdul Wakil, a resident who escaped, told Reuters at a checkpoint into Kabul.

The Red Cross said on Twitter that it was watching the situation closely. It had supplied body bags to the provincial hospital and was ready to provide more assistance.

President Ashraf Ghani made no mention of the crisis during an extended speech on youth affairs on Sunday and with little coming out from the government, people were left to rely on alternative sources of information.

Short videos circulating on social media, purported to be from Ghazni, showed a number of heavily armed Taliban patrolling in the city with a large plume of smoke and flames coming out from the town.

“It is over and the city is taken,” said a man standing outside his home, with several Taliban insurgents nearby.

The videos could not be independently verified by Reuters but they generated heavy commentary by social media users that underlined the shock caused by the attack.

U.S. military headquarters in Kabul said sporadic clashes were occurring and American aircraft had conducted five strikes on Saturday and four more on Sunday.

“The Afghan National Defence and Security Forces continue to hold their ground and maintain control of all government centers,” Lt Col Martin O’Donnell, U.S. Forces Afghanistan spokesman, said in an emailed statement.

The Taliban have not taken a major provincial center since they overran the northern city of Kunduz in 2015 and the assault on Ghazni was a major blow to the Western-backed government just weeks before parliamentary elections scheduled for Oct. 20.