Updated: A second Spanish policeman has died following a Taliban attack near Spain's embassy in Kabul that also killed at least four Afghan policemen, Spain's interior ministry said on Saturday.

Officer Jorge Garcia Tudela died at dawn from wounds sustained during the siege in the Afghan capital's diplomatic quarter late on Friday, the ministry said in a statement.

News of the Tudela's death comes after Spanish Prime Minister Mariano Rajoy confirmed late on Friday that a first policeman had been killed in the attack. He was named as Isidro Gabino Sanmartín Hernández by Spanish media.

The officers were killed during an an hours-long Taliban siege near the Spanish embassy in Kabul's diplomatic quarter, the latest high-profile insurgent attack that ended early on Saturday.

During the siege, security men near the embassy ducked from gunshots as they hauled away a limp body and two wounded men -- one bleeding from the head, the other a policeman with a gunshot wound to his leg -- through the dark to a waiting ambulance, a photographer with the AFP news agency saw.

The embassy had been earlier reported to be the target of the attack, but Rajoy clarified that the assault was nearby and not on the compound.