Rayo Vallecano back in La Liga
Alex Moreno’s goal for the hosts in the 40th minute sealed Rayo’s return to La Liga after two seasons away.
Huesca had already secured promotion last weekend with a 2-0 victory at Lugo.
The third team to move up will be the winner of a two-round playoff between the four teams that finish the season from third to sixth.
Malaga, Las Palmas and Deportivo La Coruna were all relegated from the top flight this season.