Defence and interior ministers, as well as a security chief, sent their resignations on Saturday.

Afghanistan‘s President Ashraf Ghani has rejected resignations tendered by three senior officials.

The resignations from Defence Minister Tariq Shah Bahrami and Interior Minister Wais Barmak, as well as Masoom Stanekzai, head of the National Directorate of Security, were submitted on Saturday, hours after National Security Adviser Hanif Atmar quit.

But government spokesman Haroon Chakansuri said in a statement that President Ghani asked the three officials to continue with their duties and “work towards the betterment of the security situation”.

Two senior interior ministry officials said the trio cited policy differences with the government amid deteriorating security as the main reason for resigning.

The security shake-up comes after weeks of unrelenting attacks by the Taliban, who have seized several districts across the country in recent years.

There have also been suicide attacks in Kabul and other major cities.

“After the attack on Ghazni province and the presidential palace in Kabul, the government came under immense public pressure,” Najeeb Nangyal, an Afghan political analyst, told Al Jazeera.

“So, President Ghani may decide to take some action to bring some reform because the attack on the presidential palace was a security failure.”

Authorities have been bracing for more attacks with parliamentary elections due to take place on October 20.