The incident happened Wednesday in the town of Majorca, TheLocal.es reported.
Police said when the man, whose name was not reported, threw a bag of garbage into an outdoor trash can, the bag exploded, causing several windows in the area to shatter, set off the airbags in one car and gave the man a bloody nose.
Investigators said the trash bag contained firework materials which reacted with the metal trashcan, causing the explosion.
Local residents said the suspect is a former fireworks specialist and 10 years ago caused a similar explosion.
2014: NFL Cheerleaders [PHOTOS]
Father of murdered schoolgirl Sarah Payne dies