Cristiano Ronaldo scored on the rebound after having a penalty saved to give La Liga champions Real Madrid a scarcely-deserved 3-2 win at home to Malaga on Saturday, which moved them provisionally seven points behind leaders Barcelona.
Ronaldo had failed to score in his last four league games for Real and his rotten run in front of goal looked set to continue when his spot-kick was turned away by visiting goalkeeper Roberto.
He was well-placed, however, to knock in the rebound for Real's third goal in the 76th minute.
An unconvincing Real had twice thrown away the lead against Malaga, who have lost every away game so far this season.
Karim Benzema nudged in Real's opening goal in the ninth minute after Ronaldo's header came back off the bar but Malaga levelled in the 16th through Uruguayan Diego Rolan after an awful misplaced pass in the area by Real's Toni Kroos.
Germany midfielder Kroos made amends by whipping in a corner which Casemiro leaped to head Real back in front in the 21st minute, while Malaga were denied an equaliser on the stroke of halftime for a foul by defender Paul Baysse on Dani Carvajal as he headed home.
Malaga pulled level again 12 minutes into the second half following two errors from Madrid. First Raphael Varane gave the ball away and then goalkeeper Kiko Casilla let Gonzalo Castro's shot from distance slip through his hands.
Real took the lead for the third time when Luis Hernandez tripped Luka Modric in the area, allowing Ronaldo to convert at the second time of asking.
Real are third in the Liga standings on 27 points while Atletico Madrid, who are fourth on 24 visit Levante later on Saturday.
Barcelona are top with 34 points and visit second-placed Valencia on Sunday, with the chance to move seven points clear at the summit.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)