Image copyright Getty Images Image caption Kabul police chief Zahir Zahir (right, on the phone) was the target of an attack earlier this month which killed his deputy

The police chief of the Afghan capital who resigned on Sunday is to remain in his post, despite a surge in deadly militant attacks, his spokesman says.

General Zahir Zahir was reportedly reinstated "on the request of high-ranking officials".

He gave no reason for his resignation at the time.

However, Gen Zahir has come under increasing pressure with insurgents carrying out nine deadly attacks in Kabul in the past two weeks alone.

The latest development comes as Afghan troops prepare to take over national security ahead of the withdrawal of foreign combat troops at the end of the month.

The Taliban have stepped up attacks against foreign nationals, civilians and Afghan soldiers in recent months, raising concerns over the Afghan army's ability to protect the country from insurgents.

It is not yet clear why Gen Zahir was reinstated, after local media on Sunday reported that his resignation had initially been accepted.

Image copyright AFP Image caption Saturday's attack in Kabul was on a building used by a small US education group

"Based on the request of high-ranking officials and in order to avoid disruption of security affairs, General Zahir was asked to continue his duties," Kabul police spokesman Hashmat Stanakzai told the AFP news agency on Monday.

The same spokesman told Afghanistan's Channel 1 TV that Gen Zahir's resignation had not "been accepted by security officials".

The latest in a string of attacks in Kabul targeted a compound used by a US-based charity, killing three South Africans, on Saturday.

Last week, two American soldiers and two British embassy workers were killed in separate attacks, with dozens of Afghans also killed and injured in attacks in Kabul.

Gen Zahir was himself the target of an attack in early November, when a suicide bomber infiltrated his offices - supposed to be one of the most secure buildings in Kabul - and killed his deputy. Gen Zahir was not there at the time of the attack.

Separately on Monday, at least nine people were killed in the northern province of Baghlan when a suicide bomber targeted the funeral procession of a tribal elder.

President Ashraf Ghani, who took power in September, has vowed to bring peace after decades of conflict.

On Sunday, he ratified security deals allowing some 12,000 Nato soldiers to remain for training and advisory purposes after the withdrawal of foreign combat troops on 31 December.

A separate US-led force will assist Afghan troops in some operations against the Taliban.