Spain qualified for the Olympic sevens with a dramatic late victory over Samoa in Sunday's repechage tournament final.
The Spaniards won 22-19 with a try in the last seconds to seal the 12th and final spot for this summer's Rio Games.
They join Fiji, South Africa, Great Britain, Australia, United States, Argentina, France, Kenya, New Zealand, Japan and Brazil in the men's event.
"I am still trying to take it in. This is a dream for us. We are going to be Olympians," said Spain's Angel Lopez.
"We believed that we were good enough, but wow, this is pretty special.
"We now have to prepare. We will be very motivated and determined to do our nation, our family and Spanish rugby proud."