Relegated Almeria recorded only their sixth victory of the season, a 3-1 success which dented Real Mallorca's hopes of staying up.
Almeria, who had picked just one point from their previous eight games, stunned Mallorca with three goals in the opening 32 minutes through Kalu Uche, Juanma Ortiz and Pablo Piatti.
Mallorca managed to pull a goal back through Pierre Webo just before half-time but Michael Laudrup's men could make no further inroads and they are now just two points above the bottom three heading into the final round of the season.
Rock-bottom Almeria had failed to score in their previous five matches so it came as a surprise to see them leading 2-0 with just 15 minutes on the clock.
The opening goal came in the fifth minute when Piatti slid in around Mallorca defender Joao Vmctor - who had been trying to shield the ball out over the goalline - and his cross left Uche with an easy tap-in in the middle.
The home side's second goal was scored after Michel Macedo's attempted cross had been blocked and Ortiz latched onto the loose ball to fire a low shot past visiting goalkeeper Dudu Aouate.
The Mallorca defence could not have done much about that goal, but the first should have been avoided, as should have Almeria's third.
Antonio Luna's cross from the left looked like it should have been cut out by Aouate at his near post, but Piatti was not complaining as he slotted into an empty net.
That left Mallorca with a huge mountain to climb to get anything out fo the game, but they gave themselves a glimmer of hope when Webo made it 3-1 in the 42nd minute.
Michael Pereira did superbly to beat two defenders inside the area before stabbing the back to Webo, who had an open goal to fire into.
That was as good as it got for Mallorca though, and with no more breakthroughs in the second half they face a nervy final weekend of the season, when they host Atletico Madrid.