Real Mallorca were promoted to La Liga by overturning a 2-0 deficit to beat Deportivo La Coruna 3-2 on aggregate, watched on by 18-time Grand Slam champion Rafael Nadal.
Mallorca won 3-0 in Sunday's Segunda Division play-off final second-leg to seal back-to-back promotions.
The club is part-owned by Phoenix Suns NBA team owner Robert Sarver and ex-player Steve Nash.
It will be Mallorca's first appearance in Spain's top flight for seven years.
Nadal, who recently won his 12th French Open title, grew up on the Balearic island and was spotted in the crowd for Sunday's sensational U-turn.
The team's part-owners Sarver and Nash are part of an investment group which holds a stake in the club, including ex-Bolton Wanderers midfielder Stuart Holden.
Croatian Ante Budimir scored midway through the first half, with veteran midfielder Salva Sevilla doubling the home side's lead to level the tie on aggregate.
Match winner Abdon Prats handed Mallorca the advantage with eight minutes remaining.
Mallorca were rock bottom of La Liga in 2012-13 and were relegated to Spain's third tier Segunda Division B in 2017.
They finished the regular season in fifth place in the second division while Deportivo were sixth, forcing the clubs into a series of play-offs.
Mallorca join Osasuna and Granada in promotion to the Spanish top flight, with Huesca, Rayo Vallecano and Girona heading in the opposite direction.