Afghanistan’s defence minister and army chief of staff have resigned in the wake of a Taliban attack that left scores of soldiers dead, the presidential palace says.
The attack happened on Friday at an army base near Mazar-e Sharif.
Insurgents targeted troops leaving Friday prayers at the base’s mosque and in a canteen, the army said.
It was the Taliban’s deadliest attack on the armed forces since it was removed from power in 2001.
The resignations coincided with the arrival of US Defence Secretary Jim Mattis on an unannounced visit to Kabul. He is due to meet both Afghan officials and US troops.
How did the attack unfold?
A group of about 10 Taliban insurgents dressed in Afghan military uniforms and driving military vehicles made their way into the base in the northern city and opened fire.
Many of those who died were young recruits training at the base. Witnesses described chaotic scenes as the young soldiers struggled to work out who was friend or foe.
The attackers were armed with guns, grenades and some were wearing suicide vests, reports said. The defence ministry said the attackers were all killed.
It is not clear exactly how many soldiers died. The Afghan defence ministry has not released firm casualty figures, only saying more than 100 people were killed or injured.
Other officials have told BBC that at least 136 people died – 124 coffins had been sent out to different parts of the country and 12 soldiers had not yet been identified, they said.
But some sources say the toll was even higher. One eyewitness told the BBC he counted 165 bodies.
At the scene today – By Justin Rowlatt, BBC News, Mazar-e Sharif
The bodies have all been removed but the scale of the carnage still is horrifically apparent. Buildings are pock-marked with bullet holes and there are sprays of blood on the walls and floors.
A few workers are cleaning up. They wear face masks against the smell and I notice that among the rubble they are shovelling are shoes and pieces of fabric.
A team of forensics officers from America and Germany cluster around one of the two pick-up trucks the Taliban fighters used to enter the base. They are collecting blood and other samples.
The floor of the vehicle is littered with spent cartridges, the windscreen is shattered and there is also evidence of the deadly subterfuge the Taliban team used to enter the base.
They were wearing Afghan army uniforms and one was pretending to be injured with a bloodied bandage on his head and a drip in his arm. The tube from that drip is still on the back seat.
The commander of the base, General Katawazai, said the long battle to regain control of the base was the most difficult he had ever experienced. He had to make sure he didn’t fire on his own troops.
But, when I asked what impact it had had on morale he surprised me. He said the attack had actually raised morale: “Now my men are even more determined to fight the Taliban,” he said.
Why have officials stepped down?
The resignations of Defence Minister Abdullah Habibi and army chief Qadam Shah Shaheem were announced in a one-line statement from the presidential palace.
No explanation was given but the attack has caused widespread anger in Afghanistan, with many questioning the government’s ability to counter the Taliban insurgency.
It comes just weeks after the assault on the military hospital in Kabul, which left dozens of people dead.
That attack was blamed on the so-called Islamic State, but many have questioned the official narrative, saying the attackers shouted pro-Taliban slogans.
In both recent attacks, people have questioned the inability of the authorities to prevent them, the lack of clarity regarding death tolls and the possibility of insider involvement.
The recent fall of Sangin in the south – a strategically important centre – has also shaken confidence in the defence establishment.
So the security situation is deteriorating?
Since the US-led Nato troops ended their mission, the Afghan military has struggled to contain the the insurgents.
According to a US government estimate in November 1016, the government had uncontested control of only 57% of the country, down from 72% a year earlier. Since then, Sangin has fallen in the south.
Militants from the so-called Islamic State group have also established a small stronghold in the east and have carried out attacks in Kabul, including targeting Shia communities.
Earlier this month the US dropped its largest ever conventional bomb on suspected IS fighters, killing dozens. But Mirwais Yasini, an Afghan MP from the east, said the US focus on IS was misguided, when the Taliban was the biggest threat.
“You drop your biggest bomb on Daesh [IS], but what about the Taliban who kill dozens of our people every day?” Reuters news agency quoted him as saying.
What is the US doing?
There are still about 8,400 US troops and 5,000 Nato troops in Afghanistan helping to build local forces.
In February the top US commander in the country, General John Nicholson, said several thousand more were needed. “Offensive capability is what will break the stalemate in Afghanistan,” he said.
But White House policy on the Afghan conflict remains unclear. Donald Trump’s administration has not yet appointed an ambassador to Afghanistan or set out its strategy for the region.
Recent visits, however, could signal new engagement. Earlier this month, National Security Adviser HR McMaster visited Kabul and said that officials would present Mr Trump with a “range of options”.
The surprise arrival of Mr Mattis could suggest new focus from the White House on this long-running conflict.