KABUL, Afghanistan -- The Taliban overran a base in northern Afghanistan, killing 17 soldiers, even as Afghan forces battled the insurgents for the fifth straight day in the eastern provincial capital of Ghazni on Tuesday, trying to flush them out of the city's outskirts, officials said. There were fears for the fate of the other troops from the base, known as Camp Chinaya, as the Taliban claimed that dozens had surrendered to them while others were captured in battle.

The attack in the north took place in Faryab province, in the district of Ghormach, according to the spokesman for the defense ministry, Ghafoor Ahmad Jawed. Along with the 17 troops killed, at least 19 soldiers were wounded, he said.

The Taliban had besieged the base, which housed about 140 Afghan troops, for three days before the massive push on it late on Monday night, said the local provincial council chief, Mohammad Tahir Rahmani.

Get Breaking News Delivered to Your Inbox

Rahmani said the base fell to the Taliban after the soldiers, who had resisted the three-day onslaught, failed to get any reinforcements and ran out of ammunition, food and water. He said 43 troops were killed and wounded in the attack but didn't give a breakdown.

Taliban spokesman Zabihullah Mujahid claimed responsibility for the attack, saying 57 Afghan soldiers had surrendered to the Taliban while 17 others were captured in battle. He said eight military Humvees were also seized.

Meanwhile, Afghan security forces on Tuesday pushed back the Taliban from Ghazni, the provincial capital of a province with the same name, and were trying to flush the insurgents from the city's outskirts.

The developments came on the fifth day after a massive Taliban attack on Ghazni. Hundreds of people have fled the fighting in the city, which has so far killed about 100 members of the Afghan security forces and at least 20 civilians.

Nasart Rahimi, a deputy spokesman at the Interior Ministry, said security forces were searching every inch of Ghazni for remaining Taliban fighters on Tuesday.

Military helicopters were supporting the ground forces' operations in Ghazni, said Abdul Karim Arghandiwal, an army media officer in southeastern Afghanistan.

Mujahid, the Taliban spokesman, denied the insurgents have been routed from Ghazni and said sporadic gunbattles were still ongoing.

The Taliban's multipronged assault on the strategic city of Ghazni, about 75 miles from the capital, Kabul, began Friday. The insurgents overwhelmed the city's defenses, pushed deep into Ghazni and captured several parts of it in a major show of force.

The United States has carried out airstrikes and sent military advisers to aid Afghan forces in the city of 270,000 people.

The fall of Ghazni, which is the capital of the province of the same name, would be an important victory for the Taliban, cutting Highway One, a key route linking Kabul to the southern provinces, the insurgents' traditional heartland.

The Taliban also destroyed a telecommunications tower on Ghazni's outskirts, cutting off landline and cellphone links to the city.

The fighting brought civilian life in the city to a standstill, and also severely damaged Ghazni's historic neighborhoods and cultural treasures.

In recent months, the Taliban have seized several districts across Afghanistan, staging near-daily attacks on security forces, but they have been unable to capture and hold urban areas.

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