A dramatic final day in La Segunda saw Sporting Gijon pip Girona to automatic promotion against the odds and Osasuna beat the drop.
Girona were considered heavy favourites to finish as runners-up and join Real Betis in La Liga next season, but a 89th-minute equaliser from Pablo Caballero rescued mid-table Lago a 1-1 draw away from home.
The match was then suspended for a few minutes as a linesman was hit by a bottle from a frustrated member of the home crowd following his decision to rule out Fabian Lejeune’s potential match-winner with just 40 seconds left on the clock.
The Catalans have never played in La Liga throughout their 85-year history and would have been the third club to represent the region after Barcelona and Espanyol.
Meanwhile, Sporting were faced with the tricky task of needing to beat Real Betis at the Benito Vilamarin to have any chance of securing second place but rose to the challenge with a 3-0 victory.
The win ends a two-season absence from Spain’s top flight for Abelardo Fernandez’s men.
Consequently, Girona will now face Zaragoza in the promotion playoffs, with Real Valladolid and Las Palmas battling it out in the other tie.
At the other end of the table, former La Liga outfit Osasuna – who have been plagued with off-field problems all season – snatched a 2-2 draw with Sabadell to stay afloat by the skin of their teeth.
Javi Flano’s equaliser on 89 minutes rendered Racing Santander’s 1-0 win at Albacete obsolete and sent another ex-top-tier team to Segunda B.