KABUL - Afghan government forces regained control of a key district near the northern city of Kunduz on Tuesday, after Taliban fighters had threatened to capture a provincial capital for the first time since being driven from power in 2001.

Tuesday’s victory came despite signs that the Islamist militant movement was stepping up its offensive in the broader war, six months after most foreign troops left the country. A day earlier, a Taliban car bomber and six gunmen launched a spectacular attack on the Afghan parliament in Kabul. All of the assailants were killed. One civilian also died and at least 30 people were wounded.

On the front lines just outside Kunduz city in the north, Afghan army and police drove the Taliban back from Chardara district, which the insurgents had captured two days before, provincial police chief Abdul Saboor Nasrati said.

“New reinforcements arrived in Kunduz from northern provinces. They have inflicted heavy casualties on the insurgents and pushed them back from Chardara district,” Nasrati said. “We are pursuing them and the gun battle is still ongoing.”

The brief capture of Chardara brought fighting to a bridge just 3 km (two miles) away from the Kunduz governor’s compound, raising fears that the insurgents could overrun the city centre.

That would mark the first provincial capital to fall to the Taliban since US-led military intervention toppled the hard-line regime, which had sheltered the al Qaeda architects of the Sept. 11, 2001 attacks on American cities.

Heman Nagarathnam, Medecins Sans Frontieres’ head of programmes in Afghanistan, said the group’s hospital in Kunduz city was still operating normally and there were no plans to evacuate staff.

Speaking from Kunduz, he said the fighting had moved closer to the city and there had been a noticeable increase in the number of Afghan security personnel and checkpoints.

“We have seen a surge in patients from Chardara and some from Dasht-i-Archi (district), but mostly from Chardara,” he told Reuters.

Airstrikes and mortar attacks in Chardara were making it difficult for people to reach the trauma centre, he added.

The violence in Kabul, Kunduz province and elsewhere has put Afghanistan’s security forces under more pressure than at any time since most NATO combat troops withdrew, and there appears to be no easy way out of the crisis.

“The war continues to gain intensity,” said Graeme Smith, a veteran Afghan analyst at International Crisis Group. “Even more concerning, the nature of the attacks is becoming more serious: rather than pot-shots at convoys, we’re now talking about battles that last for days.”

“The loss of a provincial capital would have profound effects, even if the city was overrun only for a matter of hours,” Smith said. President Ashraf Ghani met lawmakers from Kunduz at his Kabul palace to discuss the crisis, vowing “serious measures to retake lost territories and clear (the) northeastern zone of terrorists”.

Kunduz was also under siege last summer and the city centre held. In the Taliban stronghold of Kandahar in the south, insurgents threatened the provincial capital a few years ago, but were beaten back.

US officials in Washington said it was unlikely Kunduz would fall into Taliban hands, and disputed the idea that recent attacks signified the insurgents were gaining ground against NATO-trained Afghan forces.

“Although the insurgents have executed a number of violent attacks since the announcement of the 2015 fighting season, including the attack on parliament, the (Afghan security forces) have demonstrated their growing capability to provide security,” a State Department spokesman said.