Goals from Ante Budimir, Salva Sevilla and Abdon Prats helped Real Mallorca overturn a 2-0 first leg defeat against Deportivo La Coruna in the playoffs to secure promotion back to La Liga after six years.
Mallorca, who were relegated in 2013, will now join Osasuna and Granada as promoted sides to the Spanish top division for the 2019/20 season.
Deportivo had finished one point and a place behind their opponents in sixth during the regular La Liga 2 campaign, and will remain in the division for a second season.
At the final whistle, thousands of fans flooded the pitch to celebrate with the players.
Tennis star, Rafael Nadal, who is from Mallorca, posted a picture of the amazing crowd scenes on Instagram.
He captioned the scene, “No words, incredible emotions.”
The French Open champion was in attendance at Son Moix to witness the victory.
Mallorca had defeated Albacete in the play-off semi-final, but had a night to forget in the first leg of the final against Deportivo.
Marc Pedraza was sent off in the first half, before they succumbed to the 2-0 defeat.