CNN  — 

Afghan President Ashraf Ghani accepted the resignation of his national security adviser but refused the resignations of three other security officials as the country battles the Taliban.

“Today the ministers of defense, interior affairs and the director of the national directorate of security presented their resignations to the president. The President did not accept their resignations and asked them to continue in their jobs and gave them necessary guidance for the improvement of security situation,” the President’s office tweeted Sunday.

However, Ghani accepted National Security Adviser Mohammad Hanif Atmar’s resignation, replacing him with the nation’s ambassador to the US, Hamdullah Mohib, the president’s spokesman, Haroon Chakhansuri said.

Afghanistan’s TOLO News channel quoted Atmar as saying he resigned over “serious differences over policies and approaches at the top level of government.”

Ghani said accepting Atmar’s resignation had been “difficult” but that it was “for the benefit of the country,” TOLO reported. Mohib, 35, took over as national security adviser Sunday morning.

In May, Mohib wrote an opinion article for CNN after a terror attack on a cricket match in his hometown of Jalalabad that had been organized to celebrate peace and unity during Ramadan. In the article, he described his hopes for a peace that would transcend political and ethnic divisions, saying: “My generation envisions a different Afghanistan.”

Deadly attacks

For now, violence continues in Afghanistan, with a string of deadly attacks this month.

On August 10, the Taliban launched a brazen attack on the strategic city of Ghazni, south of the capital Kabul, seizing key buildings and trading fire with security forces.

At least 150 people were killed and 40 injured, the majority of them Afghan security forces.

The Taliban had last attacked a major urban center in 2015 and CNN’s Nick Paton Walsh described the assault on Ghazni as the militant group’s “most serious challenge to the authority of Afghanistan’s government in three years.”

“The Afghan government has said it wants to control the territory in which 80% of the population lives by the end of 2019,” Paton Walsh wrote. “It currently controls 65%, up from 64% this time last year.

On August 14, 39 soldiers died in Baghlan province when the Taliban overran their base. And 17 troops were also killed when their base in Faryab was also overrun.

The following day, at least 34 people were killed in a suicide attack targeting an education center in Kabul. A Taliban spokesman denied responsibility for that attack.

Push for peace

On August 19, Ghani offered a month-long ceasefire with the Taliban.

The two sides had a brief truce in June and Ghani said then that the government was looking to engage in peace talks with the Taliban and hoped to convert it to a political group.

The Taliban have been waging a bitter fight in Afghanistan, with the ultimate goal of ruling the country and imposing its strict interpretation of Islamic law. The group controlled Afghanistan until its 2001 ouster by the US-led coalition that invaded following the 9/11 attacks.

In recent years, a resurgent Taliban have taken control of significant swaths of the country and raised questions about the Afghan government’s ability to protect the country.

The Taliban grew out of the US and Saudi-backed mujahideen movement that fought a bloody guerrilla war against the Soviet Union after that country invaded and occupied Afghanistan in 1979.

The Taliban are formally banned in Russia, but in recent months Moscow has stepped up contact with the group. Russian Foreign Minister Sergey Lavrov said last Tuesday that representatives of the Taliban would take part in talks in Moscow next month on the future of Afghanistan.