Levante's push for European football has taken a knock after a 5-3 defeat at home to Rayo Vallecano.
Alhassane Bangoura struck after 35 minutes to give the visitors a half-time lead.
Levante were level five minutes after the break when Jose Barkero fired in from the penalty spot following Jorge Pulido's foul.
However, two goals in as many minutes from Diego Costa swung the match in Vallecano's favour.
The striker's header found the net on the hour before another finish soon after put his side 3-1 ahead.
They went further in front with 20 minutes to play as Bangoura bagged his second of the match.
Ruben Suarez pulled one back for Levante in the 80th minute before Andrija Delibasic's goal five minutes from time restored Rayo's three-goal cushion.
Suarez had the final word when he scored from the penalty spot, but it was too little too late for the home team.