An Afghan soldier secures the site of a suicide bomb blast near the police administration building, in Kabul, Afghanistan, on Feb. 1, 2016. (Jawad Jalali/EPA)

A suicide bomber killed at least nine people and wounded 12 in an attack on a police base in Kabul on Monday, an Afghan official said.

Kabul police spokesman Basir Mujahid said the attacker joined a line of people waiting to enter the local headquarters of a branch of the national police after having lunch and praying outside. The bomber detonated his explosives after being spotted near the gate.

“Unfortunately, the majority of the killed and wounded are civilians,” Mujahid said, adding that two police officers were among the dead and a third was wounded.

Afghanistan’s president, Ashraf Ghani, condemned the attack in a statement. “Such acts are unforgivable crimes against civilians,” the statement said.

“The government will never have talks with those groups who kill innocent civilians, women and children,” the statement said. “Instead the Afghan security forces will mobilize in their fight against them.”

A statement from the international military coalition in Afghanistan also condemned the bombing and set a higher death toll, saying that 20 Afghan police officers were killed and 25 officers and seven Afghan civilians were injured. The discrepancy between the two reported death tolls could not be immediately reconciled.

Afghanistan, Pakistan, China and the United States are set to hold a third round of talks in Islamabad on Saturday. The countries seek to lay the groundwork for a direct dialogue between the Kabul government and the Taliban. Ghani has said that those insurgents who do not join the peace process will be wiped out.

The attack Monday targeted the Afghan National Civil Order Police, a militarized force that often fights on the front lines of the war with the Taliban.

The attack took place in a busy part of western Kabul, near the zoo. Officials had initially said the explosion was caused by a suicide car bomb.

The Taliban claimed responsibility for the bombing on Twitter. The insurgents, who have been at war with the government for 15 years, often target local security forces.