The hosts almost took the lead within seven minutes when Damia's downward header was well stopped by Wilfredo Caballero, who then recovered in time to make an even more impressive second save to deny Alvaro Cejudo's rebound.
Malaga were ahead in the 14th minute when Garcia Samuel received the ball in the box before hitting a first-time strike past the keeper to break the deadlock.
Malaga's task of holding on to their lead was made even harder just seven minutes after the restart when Jesus Gamez was dismissed having picked up a second yellow card.
However, the visitors went on to score another in the 66th minute as Nordin Amrabat found space inside the box to pick out the bottom left corner and give his side some breathing space.
The hosts almost pulled a goal back with 10 minutes remaining as a scramble inside the box resulted in Torres firing an effort towards the bottom corner, but once again Caballero was on hand to save his side.
Malaga held on to claim three valuable points that lift them all the way up to 13th in the table.