"There was no intention to attack the Spanish embassy in Afghanistan... it was an attack against some guesthouses very near the embassy," he told reporters in the southeastern city of Alicante, adding one Spanish policeman had nevertheless been slightly injured.

The Taliban have claimed responsibility for the assault, which saw Kabul's Sherpur district rocked by a massive car bomb and gunfire, but it was not immediately clear if there were casualties.

A Spanish foreign ministry spokesman in Madrid told earlier that the embassy had been attacked, information confirmed by the Kabul police.

But Rajoy said "it was not an attack against us," adding all employees at the embassy had been evacuated.

Latest News from World News Desk