Afghanistan's interior minister and the head of the intelligence service have resigned over Wednesday's attack on a peace conference.
Hamid Karzai, the president of Afghanistan, accepted the resignations on Sunday.
"President Karzai accepted the resignation letters of the minister of interior [Mohammed] Hanif Atmar and of the chief of the NDS [Afghan secret service] Amrullah Saleh," the president's office said in a statement.
The statement said the explanation they had given for last Wednesday's attack was "not satisfactory".
The intelligence chief told a press conference he had resigned for "moral" reasons after Karzai rejected his explanations, adding that there were also "dozens of other internal and external reasons".
"The president of Afghanistan has lost trust in our capability to protect national events," he said.
Despite tight security, fighters managed to fire at least five rockets in the direction of the tent where the conference, locally called jirga, was held in the capital, Kabul.
One of the missiles landed about 200 metres away, but none of the 1,500 delegates were injured.
The Taliban, which was not invited to the meeting, claimed responsibility for the attack.
Hours before the resignations, Zemeri Bashary, the Afghan interior ministry spokesman, gave new details of the attack, saying two attackers had eluded police providing security to the conference by dressing up as a couple - one as a man in street clothes and the other dressed in a woman's burqa.
They had hidden a Kalashnikov rifle and a grenade launcher by wrapping them up in cloth like swaddled baby.
Bashary said that two major errors were made that allowed the couple to sneak through: insufficient intelligence reporting about the group they belonged to; and the failure of security forces to stop and search the couple as they walked from a house they rented to the site where they launched their attack.
"It goes against all customs for a man to search a woman, so the enemy took advantage of this," Bashary said.
Authorities said they had shot dead two fighters wearing bomb wests and captured another.
Bashary said security forces had prevented other attacks on the jirga, arresting 15 Taliban fighters and capturing 700 rockets and 250kg of explosives in remote districts of Kabul province.
After his resignation, the interior minister said the president had been pleased with the work done by the security forces.
"He has shown great appreciation for our forces, especially the Afghan police, but he was not satisfied and convinced when it comes to my leadership," Atmar said.
'Most trusted' figures
Al Jazeera's James Bays, reporting from Kabul, said the officials who have stepped down were seen as two of the four most important figures in the government's war with the Taliban.
"These two men were among the most trusted by the international community, in particular the Americans," he said.
"These two men were among the most trusted by the international community, in particular the Americans."
Al Jazeera correspondent
"Mohammed Atmar ... is widely seen as having done a good job in reforming the [interior ministry], which was in a pretty desperate state when he took over.
"And Amrullah Saleh is praised by the Americans. They believe he has been providing them with good intelligence on the Taliban.
"I think Hamid Karzai believes that [accepting the resignations] will show the public that he's dealing very seriously with those security lapses that took place at the jirga."
Geoff Morrell, the Pentagon press secretary, said both Atmar and Saleh were "people we admire and whose service we appreciate".
But General Stanley McChrystal, commander of US and Nato forces in Afghanistan, said in a statement that he respected Karzai's authority to make this "difficult decision".
"I remain confident in President Karzai's leadership and his ability to appoint credible replacements to lead these critical organisations charged with protecting the Afghan people and ensuring their sovereignty," he said.