A Policia Nacional officer fatally shot himself on Thursday while on duty in a Castellon city courthouse in the Valencia region.
The man was in the forensics area of the building on Blascon Ibañez Boulevard when he drew his own gun and fired it.
Paramedics were unable to save him due to the seriousness of his injuries.
The officer was said to be aged under 40 years and was married and was a father to three small children.
There was absolutely no prior indication of what he planned to do.
He had been stationed in Castellon Province for several years.
Colleagues sealed off access to the ground floor area of the courthouse which was busy at the time of the shooting.
- Granada policeman on murder charge commits suicide
- FOCUS: Mental health and the state of the nation in Spain