Ghana striker Richmond Boakye struck with the final kick of the match to earn Elche a vital victory over fellow Primera Division strugglers Getafe.
After 92 goalless minutes, the on-loan Juventus striker, who came off the bench, made it 1-0 by heading in Carles Gil's cross.
The victory put four points between the two teams, easing Elche's fears but leaving Getafe looking very nervously over their shoulders.
Although Elche enjoyed more of the play, Getafe will feel they had the better of the chances.
Elche's Cristian Herrera was the first to threaten in the seventh minute with a shot past the post but Getafe came very close to scoring five minutes later when Angel Lafita's long-range effort struck the frame of the goal.
Pedro Leon seized on the loose ball and his shot was pushed round the post by keeper Manu Herrera.
After a quieter period, Cristian Herrera tried an overhead kick that flew wide, while at the other end Ciprian Marica also shot off target.
Cristian Herrera was definitely the man most-likely-to for the hosts but he was frustrated again in the 33rd minute when his shot was saved by Jordi Codina.
Gil had the first effort of the second half in the 58th minute but his shot was comfortable for Codina.
Getafe had a decent opening moments later but Marica headed Leon's free-kick wide.
Both managers made changes, with Boakye replacing Herrera in the 73rd minute, but time was running out.
Manu Herrera made a vital save in the 88th minute from half-time substitute Diego Castro and it was Elche and Boakye who had the final say.
Boakye is fighting hard to push for a call-up in Ghana's squad for the 2014 World Cup finals.