Waldo’s spectacular strike earned Real Valladolid a 1-0 over Bilbao to move 17th, one point clear of Girona, and relegated Rayo Vallecano.
The Vallecas side, 19th, cannot escape the relegation zone even though they have two games remaining.
Huesca, who face Valencia later Sunday, could also go down if they are beaten.
Girona were well-beaten by Getafe, who nourished their Champions League dream with a 2-0 victory over the Catalans.
"It has been a hugely important day, now they tell me that we’re guaranteed a European spot and for that I have to congratulate the team," said Getafe’s coach Jose Bordalas.
"It was unthinkable that Getafe would fight to get into Europe. We have to enjoy that, although there are two games to go."