La Liga's bottom side Elche stunned Villarreal 3-1 on Saturday, winning their first game all season.
The Yellow Submarine, provisionally fifth, are chasing Champions League qualification but were sunk by a Pere Milla hat-trick at the Manuel Martinez Valero Stadium.
Elche did not manage a win in the first half of the season but finally triumphed in their 20th game, with Milla firing home in the third minute to open the scoring.
Gerard Moreno levelled but Elche moved ahead in stoppage time at the end of the first half.
Milla converted a penalty after Jorge Cuenca brought down Ezequiel Ponce to restore the advantage for Pablo Machin's side.
The forward then netted again from the spot after he had been fouled in the second half to seal his team's win, although he was taken off injured before the hour mark.
Elche, on nine points, are 11 from safety and have played a game more than Valladolid, 17th, who face Real Sociedad on Sunday.