Published : 12 Dec 2015, 02:12 AM
Updated : 19 Oct 2022, 07:05 PM
Rajoy had said earlier the policeman had been wounded in the attack and had been transferred to a nearby hospital.
The attack, which the Taliban said was targeted at a guest house attached to the embassy near a heavily protected area of the capital close to many foreign embassies and government buildings, wounded at least seven people.
The car bomb was not directed against Spain and no other embassy staff were hurt, Rajoy said in the earlier statement to reporters.
The Taliban attack wounded at least seven people, dimming any hopes of peace talks with moderate elements of the Islamist insurgent movement.
Gunfire was reported immediately following the explosion.
A spokesman for the Spanish foreign ministry initially said the explosion took place outside a fortified "green zone" housing other embassies and UN buildings.
Security forces with armoured vehicles were deployed around the scene, with at least three insurgents involved in the attack, according to one police official.
Deputy Interior Minister Ayoub Salangi said two of the attackers had been killed by snipers and a third was wounded. Security forces were proceeding with caution because they were not sure exactly how many attackers might still be inside.
At least seven people were brought to a hospital operated by the aid group Emergency, 700 metres (yards) from the Spanish embassy, according to a tweet from the organisation.
Spain, which contributed to the international force in Afghanistan, withdrew the last of its troops in October although a few officers remain at the headquarters of NATO's Resolute Support Mission in Kabul.
Members of Afghan Crisis Response Unit (CRU) arrive at the site of a Taliban attack in the Afghan capital of Kabul, Afghanistan Dec 11, 2015. Reuters
The same day, Ghani returned from a regional peace conference in Islamabad aimed at reviving stalled peace talks with Taliban militants following several months of relative calm in the Afghan capital.
On Thursday, the head of Afghanistan's intelligence agency resigned over a row with Ghani, in a move that underlined the divisions among leaders of the country's security apparatus.
The Taliban has been caught up with a bloody internal power struggle but it has nevertheless been able to mount well-coordinated attacks on targets across the country.
Militants have stepped up the insurgency following the withdrawal of international forces from combat operations last year, achieving a series of successes, including seizing the northern city of Kunduz in September.