Malaga made hard work for themselves but ultimately beat 10-man Gijon 3-2 in their La Liga clash at Estadio La Rosaleda on Friday evening.
Borja Viguera opened the scoring for the struggling side after 13 minutes but they were pegged back by Pablo Fornals' equaliser in stoppage time at the end of the first half.
Duje Cop scored a quick-fire response, after just five second-half minutes before Sandro Ramirez netted a 65th minute equliser.
Lillo Castellano's was dismissed for a second bookable offence with 71 minutes on the clock, enabling Malaga to secure a winner, through Michael Santos seven minutes later.
The result sees Malaga jump two places to ninth, on 15 points, while Gijon remained in 18th place, on nine points.
— Málaga CF (@MalagaCF) November 4, 2016
Roberto Rosales had an early sighter that flew well over the target as the hosts dominated early on.
Ivan Cuellar made a great save to deny Juanpi from heading home a 12th minute free-kick before Viguera tapped into an empty net following a good pass from Cop.
Chory Castro fired wide before a rare but poor chance for Gijon as Moi Gomez failed to hit the target after a good run into the box.
Santos threatened to score at the end of the first half, but Fornals did just that from a rebounded shot that he smashed into the bottom right corner of the net from the edge of the box.
Cop hit a superb free-kick inside the left hand post at the start of the second half
Castro missed a couple of long-range efforts before Javier Ontiveros Parra's great cross found the head of Ramirez for Malaga's second.
Castellano then saw red and after Santos wasted another good Parra delivery, he headed home from Juan Carlos to secure all three points.