Giovani Dos Santos gave Mallorca a lifeline by scoring a last-minute winner against fellow relegation rivals Celta Vigo to claim three precious points.
A match of few clear cut chances looked to be heading for a draw until Mallorca launched a flurry of attacks late on and the Mexico international bundled the ball over the line after Celta goalkeeper Javi Varas failed to hold onto a header by Tomer Hemed.
The result means the Islanders move off the bottom of the Primera Division table, displacing Celta in 19th place and moving three points clear of the Galicians, and now they are just one point from safety.
The first half will not be remembered for being the most exciting display of football this season.
Celta midfielder Alex Lopez was presented with the best chance in the opening 45 minutes when he raced onto a header by Mario Bermejo following a throw in and was through on goal, but he pulled his shot just wide of the far post.
Mallorca, despite having more of the ball, only managed to hit the target from two free-kicks, both taken in the space of two minutes by Dos Santos, but both of which were fisted away by Celta goalkeeper Javi Varas.
Celta made a better start to the second half and thought they should have been awarded a penalty when Bermejo was brought down by Pedro Geromel, but the referee waved play on.
Earlier, Jonathan Vila had headed a cross from Michael Krohn Delhi over the bar.
Borja Oubina then tried a volley which went just over the bar, and Mallorca goalkeeper Dudu Auoate later kept out a header by Celta centre-back Andres Tunez.
At the other end, Varas produced an inspired save to deny Alejandro Alfaro.
As the minutes ticked away the home crowd became restless and Mallorca poured forward.
Substitute Michael Pereira had had a positive impact since replacing Jose Luis Marti but he shot well wide of goal in the final minutes, bringing an encouraging attacking move to a disappointing end.
However, his side would produce one final attack, which was to put to better use.
Tomas Pina got down the left wing and delivered a cross into the box.
Hemed rose to head the ball down and Varas made the save, but could only push the ball as far as Dos Santos, who nudged the ball in from three yards out to send the home crowd wild.