Malaga have battled from a goal behind to claim a 2-1 victory over fellow strugglers Rayo Vallecano in the Spanish capital.
Los Boquerones found themselves a goal down just six minutes in, but a second-half fightback helped claim all three points which lifts them above their opponents on goal difference.
Former Cardiff City forward Javi Guerra was the man to find the breakthrough, striking the ball across goal and beyond the reach of Idriss Kameni to give the hosts a dream start.
Jozabed Sanchez then saw a good chance to bag a second of the afternoon pass him by, while Rayo teammate Pablo Hernandez also had an effort blocked from inside the box.
The visitors found themselves on level terms when Charles pivoted with the ball at his feet and fired home for Malaga's first away goal of the season - a run spanning close to 700 minutes.
There was better to come, too, as Duje Cop found a way through late on to lift his side out of the drop zone and marginally above Los Franjirrojos in a congested La Liga table.