In December 2014, Daniel Perez Berlanga rammed a car with an explosive device made up of gas cylinders and fertiliser through the glass front of the building, reaching a staircase inside.
The device did not go off and no one was hurt in the incident, which triggered a major security alert as dozens of police cars shut off the central Madrid street where the party's headquarters are located.
He later said his target was the entire political class in general.
A Madrid court found Berlanga guilty of making and possessing an explosive device and attempted arson and sentenced him to five years behind bars, in a ruling dated May 10 that was published on today.
"The accused wanted the device which was inside the car to explode and cause a fire at the headquarters, accepting that his action threatened the lives of the people who were inside," the court ruled.