Afghanistan's defence minister and army chief of staff have resigned in the wake of Friday's Taliban attack that left scores of soldiers dead, the presidential palace says.
The attack happened at an army base near the northern Mazar-e Sharif city.
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 US-led forces drove them from power in 2001.
The resignations coincided with the arrival of US Defence Secretary Jim Mattis for a visit to Kabul.
Mr Mattis said the attack "shows why we stand with the people of this country against such heinous acts".
Insurgents are also reported to have attacked a base in eastern Khost province. A car bomb detonated at the entrance to Camp Chapman, a US-operated base, and there were a number of Afghan casualties, Reuters reported.
The resignations were announced in a brief statement.
No explanation was given but the attack has caused widespread anger, with many questioning the government's ability to counter the Taliban insurgency.
It comes just weeks after the deadly assault on the military hospital in Kabul.
That attack was blamed on the so-called Islamic State, but many have questioned the official narrative, saying the attackers shouted pro-Taliban slogans.
People have also questioned the inability of the authorities to prevent such attacks, 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.