A 2-0 win at home to Numancia secured a spot in La Liga for the first time in 10 years for Alaves.
Manu Garcia and Raul Garcia scored the goals as Alaves beat Numancia 2-0 to secure promotion from Spain's Segunda Division.
The Basque club will play La Liga football for the first time in 10 years next season.
Alaves was two goals to the good at halftime to put the Estadio de Mendizorroza in a party mood.
Leganes is well placed to join Alaves in the top flight next season, in second place with one match to play, but Gimnastic Tarragona is lurking just a point behind.