Spain will make their first appearance at the men's Rugby World Cup in 24 years after qualifying for the 2023 tournament in France.
A 33-28 win against Portugal was enough for Spain to advance as the second European qualifiers, after Georgia's spot was confirmed on Thursday.
Russia's ban from qualification ensured Georgia would compete in France.
Spain will face Scotland, Ireland and South Africa in Pool B as well as an unconfirmed Asia-Pacific qualifier.
The side's only other men's World Cup appearance came in 1999, when they lost all three of their pool games.
"It's been a long journey and a very tough qualification process," said Spain head coach Santiago Santos.
"We lost our first three games and after that, we have won six in a row. The performance of the team was amazing and we are very excited to be going to the Rugby World Cup."