Deportivo La Coruna has clinched promotion back to the Spanish first division with a 2-1 home defeat of Huesca, which provoked a euphoric pitch invasion in Riazor.
Deportivo was surprisingly relegated a year ago but has had few problems in finishing top of the second division.
Deportivo won La Liga in 2000 and the Spanish cup in 1995 and 2002. It almost reached the finals of the UEFA Champions League in 2004 before entering into a long decline, which culminated in relegation in 2011.
With just one game left, Deportivo is four points ahead of Galician rival Celta Vigo, which is well placed to finish second and take the second direct promotion place.
The third promotion place will be decided by a four-team play-off, likely among Real Valldaolid, Alcorcon, Cordoba and Hercules.
The teams relegated from the first division are Villarreal, Sporting Gijon and Racing Santander.