Kabul: Kabul’s police chief resigned on Sunday, a spokesman said, after the Afghan capital was hit by at least nine militant attacks in the last two weeks with foreign compounds, embassy vehicles and US troops among those targeted.

General Zahir Zahir resigned shortly after he confirmed that three South Africans and an Afghan citizen were killed in a Taliban attack on Saturday evening.

Zahir said the head of a foreign organisation, his son and his daughter were all killed, but the identity of the organisation was still not confirmed.

“The attackers first shot dead the director as they entered the building,” Zahir said at a press conference, giving no further details about the victims’ age.

After the event, Kabul police spokesman Hashmat Stanakzai said that Zahir had resigned.

“General Zahir Zahir told the interior ministry he no longer wanted to continue his job. The minister has accepted his resignation,” Stanakzai said.

Taliban spokesman Zabiullah Mujahid claimed on Twitter that the compound hit on Saturday was that of a secret Christian missionary group and that a meeting of Australian visitors had been hit.

The US-led Nato combat mission in Afghanistan will end on December 31. The mission will be replaced by a 12,500-strong force supporting the Afghan army and police, who have taken over responsibility for thwarting the Taliban.

Fears are growing that the declining international presence is already fuelling the Islamist insurgency.

Partnership in Academics and Development (PAD), a small US-based education aid group, posted a message on its website, saying three of its staff had been killed in the attack.

“The attack ... by multiple gunmen included one who detonated a personal explosive device killing three and injuring other staff members,” the website said.

“In the midst of this unprovoked attack, Partnership in Academics and Development remains committed to providing educational resources for Afghan citizens as they become part of the international community.”

In the latest attack, gunmen wearing suicide vests stormed the building apparently looking for foreigners.

A neighbouring building was engulfed in flames as security forces took three hours to hunt down the militants.

Saturday’s attack came two days after the Taliban struck at another foreign guesthouse, wounding a guard, and a suicide bomber targeted a British embassy vehicle in a blast that killed six people.

Afghan soldiers and police have endured soaring casualties on the battlefield, with more than 4,600 killed this year as they take on the Taliban with less assistance from the US military.

President Ashraf Gani, who came to power in September, has vowed to bring peace to Afghanistan after decades of conflict, saying he is open to talks with the Taliban who ruled Kabul from 1996 to 2001.