Real Betis saw their hopes of a vital Primera Division win snatched from their grasp as Malaga scored two late goals and Ruben Castro missed a last-minute penalty in Monday night's clash at Estadio Manuel Ruiz de Lopera.
The game ended at 2-1 after Betis had held the lead following Lorenzo Reyes' 25-yard curling strike in the 30th minute.
The struggling home side, who are rooted to the bottom of the overall standings and started the game eight points adrift of safety, looked to set to claim three crucial points in their bid to survive until Malaga striker Juanmi netted an equaliser in the 83rd minute.
With a point still something of a positive result for a team which has taken seven of their 22 points from the last four games, they were to be denied even that thanks to Sergi Darder's 86th-minute winner.
Betis had the chance to claim a point from the penalty spot in the dying moments after Nacho Camacho brought down Alfred N'Diaye, but Castro's power-kick hit the crossbar.
In the night's other game, Levante ended a four-game winless streak with a 2-0 success at Granada.
The Valencia club are marooned in mid-table and have been off the pace form-wise, but managed to put a fine second-half performance together to take the win.
David Navarro and Pedro Lopez got the goals which pushed them up to 40 points and gave them an outside chance of making the Europa League qualifying spots.