Deportivo La Coruna secured promotion back to the Primera Division with a 1-0 victory over Real Jaen on Saturday.
Carlos Marchena scored the only goal of the game in the 29th minute to see Deportivo, who were relegated in 2012-13, back into the top flight.
Their success was unexpected given the off-field problems facing the club at the start of the campaign, when they were threatened with demotion to the third tier in a dispute over unpaid wages.
Depor will now look to finish ahead of Eibar at the top of the Segunda Division when they travel to Girona for the final match of the season next weekend. Eibar, who have already secured their place in the top two but face a financial battle to ensure promotion, head to Numancia.
A third team will be promoted via the playoffs.