In December 2014, Daniel Perez Berlanga rammed a car with an explosive device made up of gas cylinders and fertilizer 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.
Berlanga, 37, told police at the time that he was a ruined businessman who blamed Prime Minister Mariano Rajoy's conservative PP government for his problems.
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 10th that was published on Monday.
“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.
The attack caused just over €41,000 ($45,500) in damages to the building, the court added.