Albacete upstaged Recreativo Huelva 2-1 to advance to the Copa del Rey round of 32 on Tuesday.
Luis Cesar Sampedro's Albacete had lost four games in succession to languish at the foot of the table in the Segunda Division.
But Albacete returned to form against high-flying second-tier rivals Recreativo in the cup, thanks to goals from Sergio Cidoncha and Ruben Cruz at the Estadio Carlos Belmonte.
Cidoncha opened the scoring in the 35th minute, firing the ball through the legs of Recreativo goalkeeper Ruben Gonzalez.
The home side doubled their lead after 72 minutes via Cruz, while Victor Diaz pulled a goal back for Recreativo with four minutes remaining.
Joining Albacete in the next round are Deportivo Alaves, who edged Mirandes 1-0 away from home.
Manu Barreiro's 86th-minute strike at the Estadio Municipal de Anduva was all that separated the two teams.