Malaga moved back level on points with Levante in fourth place in the Primera Division after coming from behind to beat Rayo Vallecano 4-2 at La Rosaleda.
The hosts got off to a nightmare start as Jesus Gamez brought down Emiliano Armenteros inside the area and Diego Costa slotted home the penalty inside five minutes.
Salomon Rondon headed Malaga level at the end of a great team move 10 minutes before the break and the Venezuelan got his second of the night with a neat turn and finish 13 minutes into the second-half.
Enzo Maresca then headed in a third and, after Roberto Trashorras converted another penalty for the visitors, Duda sealed all three points with a magnificent 30-yard strike in the top corner.
Malaga came into the game as one of the league's form sides having taken 10 points from the last 12, but they made a sloppy start as Gamez allowed Armenteros to get free down the left before clipping the Argentinian's heels as he was readying himself to shoot.
Costa sent Willy Caballero the wrong way with the resulting penalty to take his tally to six goals in seven games since joining Rayo in January.
The home side responded well, though, and after Weligton was unlucky to see his header come back off the bar they created a superb goal as Isco, Joaquin and Santi Cazorla combined to play in Eliseu and the Portuguese's cross was nodded in by Rondon.
Malaga continued to boss the game after the break and deservedly went in front when Rondon showed great strength to spin his marker inside the area and sent a low finish under goalkeeper Joel.
And Maresca had only been on the field two minutes when he appeared to have settled the game with a brave header from Gamez's cross 21 minutes from time.
Chances were then missed at both ends as Caballero reacted smartly to block Michu's close range effort before Rondon wasted a great chance for his hat-trick as he was denied by Joel and Sebastian Fernandez's follow-up effort was incorrectly ruled out for offside.
Rayo were handed a lifeline with six minutes remaining when Caballero brought down Costa and another penalty was awarded by Mateu Lahoz.
The Brazilian handed responsibility for the spot-kick over to Trashorras and he made no mistake to make it 3-2.
But Malaga swiftly restored their two-goal cushion two minutes later when Duda picked up possession midway inside the Rayo half and thundered a shot high into the right-hand corner of Joel's net.