KABUL, Afghanistan — A four-day assault by the Taliban on a key provincial capital has killed about 100 Afghan security forces, the country’s defense minister, Tariq Shah Bahrami, said Monday. Twenty to 30 civilians have been killed in the fighting, he said.

It is a major show of force by the Taliban as capturing Ghazni in the east of the country would cut off a key highway linking Kabul to the traditional insurgent heartland in the south.

The militants' multipronged militant assault overwhelmed Ghazni, a strategic city of 270,000 people barely 75 miles from the capital, Kabul. That so many fighters were able to mass and threaten the key town piles pressure on the government of President Ashraf Ghani.

Smoke rises after a Taliban attack Ghazni. Zakeria Hashimi / AFP

The United States has sent military advisers to aid Afghan forces. The spokesman for U.S. forces in Afghanistan, Lt. Col. Martin O'Donnell, told NBC News that the Americans had conducted 24 airstrikes in the city since Friday — 16 on Sunday alone.

In total, 1,000 local troops have been sent to the city, according to Bahrami, and 194 insurgents, including 12 commanders, were killed.

Afghan interior minister, Wais Ahmad Barmak, said Taliban fighters were hiding in mosques and homes in Ghazni and were using residents to use as a human shield.

The tactic was slowing the operation to secure the city, Barmak said, because government forces “were trying to avoid civilian casualties.”

Lines of communication to the area had been almost completely cut and NBC News was not able to confirm the government's version of events.

Taliban claims to have captured the city’s prison and freed inmates were wrong, he added. The facility, and the local police headquarters, “are totally in our control,” he said.

Some Afghans said the assault was not a surprise, and followed months of build-up by militants near checkpoints around the city. The Taliban have been fighting to unseat the government in Kabul since their government sheltered Osama bin Laden — the mastermind of the 9/11 attacks — and were then toppled by a U.S.-led invasion.

The Taliban have not taken a major center since overrunning Kunduz in the north in 2015.

The attack on Ghazni began Friday, with insurgents infiltrating homes and slipping out into the night to attack Afghan forces.

Meanwhile, hundreds of civilians have fled from the city. Ghulam Mustafa, 60, made it to neighboring Maidan Wardak province with 14 of his family members.

"The city became so dangerous," he told The Associated Press. "Ghazni has become a ghost city."

When my uncle visited us in Kabul 3 weeks ago, he said they heard fighting in nearby checkpoints every night. The storming of the strategic Ghazni city is not an accident, a lucky break by the Taliban or a surprise for the gov’t. It’s been a buildup over several years. — Ahmad Shuja (@AhmadShuja) August 12, 2018

Mustafa's wife, Razia, said they had no food, water or electricity for the past four days. "There were so many dead bodies under the bridges, at the side of roads and under the destroyed houses," she said.

A 14-year-old girl, Fereshta, who only goes by one name, said when the Taliban entered Ghazni, it was the first time in her life that she saw the insurgents.

The United States and NATO formally concluded their combat mission in Afghanistan at the end of 2014, but have since repeatedly come to the aid of Afghan forces as they struggle to combat the resurgent Taliban.

Ghani is said to be considering a cease-fire offer to the Taliban for the Muslim holiday of Eid al-Adha, which starts Aug. 21.

Ahmed Mengli reported from Kabul; Alastair Jamieson contributed from London.