Gareth Bale got his first taste of being on a winning side at the Santiago Bernabeu as Real Madrid moved to within two points of Barcelona and Atletico Madrid with a 2-0 win over Malaga on Saturday.
After Angel di Maria's intended cross had found the back of the net to give Madrid the lead just after half-time, the Welshman was introduced for the final 13 minutes on his return from a thigh injury.
And it was Bale who was brought down by Weligton in stoppage time to allow Cristiano Ronaldo to seal the three points from the penalty spot.
It was a much improved all round performance from Madrid, who were only denied a far more comfortable margin of victory due to a series of wonderful saves by Malaga keeper Willy Caballero.
Despite his return to fitness, Bale was left on the bench by Carlo Ancelotti due to his lack of match practice.
An injury to Karim Benzema also gave Alvaro Morata his chance to start and the Spanish under-21 international was highly involved in the first period as Madrid did everything but score.
Ronaldo saw a curling effort come off the top of the bar after just seven minutes and then ought to have opened the scoring when he skewed wide with just Caballero to beat.
Morata headed straight at the Malaga keeper from Di Maria's cross and Caballero was again called into action by Ronaldo as the pressure continued to build.
The opener did finally arrive less than 60 seconds after the interval in somewhat fortuitous circumstances as Ronaldo just failed to get on the end of Di Maria's cross but the ball sailed into the far corner in any case.
Isco should have doubled the advantage moments later against his old club, but Caballero got down well to parry his effort to safety.
Malaga could easily have been level on the hour mark as Mounir El Hamdaoui got the by-line and his cut-back somehow fell between three Malaga players in the middle waiting to apply the final touch.
Morata saw a glancing header flash between Ronaldo and the far post from Isco's corner and the Portuguese saw a free-kick clawed away by Caballero as the hosts looked to put the game to bed.
And the hosts were nearly made to pay for their profligacy when substitute Bobley Anderson's fierce effort flew inches past Diego Lopez's left hand post with 13 minutes remaining.
Ronaldo was denied again by Caballero when it seemed easier to score four minutes later and the Argentine produced his best save yet seconds afterwards to turn Jese Rodriguez's sweetly struck effort behind.
However, he was powerless to stop Ronaldo's perfect penalty deep into stoppage time after Bale had induced a reckless challenge from Weligton inside the area.