Karim Benzema scored a stunning stoppage-time winner as Real Madrid’s pursuit of leaders Atletico Madrid was revived with victory against Elche.
Real, who started the day eight points behind their city rivals, were stunned in the 61st minute when Dani Calvo thumped home a header.
Benzema equalised from Luka Modric’s cross in the 73rd minute.
With time running out, the Frenchman produced a glorious angled strike following a one-two with Casemiro.
Real move into second spot, a point above Barcelona who face Huesca on Monday. Atletico play Getafe at 20:00 GMT.
Benzema saves Real again
Los Blancos went into the game on the back of two draws, including last week’s 1-1 against Atletico.
During that period, bitter rivals Barcelona had taken second spot, while the leaders won their game in hand against Athletic Bilbao to extend their advantage.
Defeat against Elche was unthinkable, although the strugglers arrived at the Alfredo Di Stefano stadium on the back of an impressive win over Sevilla to move out of the relegation zone.
In the first half, Zinedine Zidane’s side barely troubled the Valencian outfit, who themselves looked dangerous on the break, especially when Colombian Johan Mojica had the ball on the left.
Real increased the tempo after the break; however, they were wasteful with possession and then given an almighty jolt when Calvo leapt highest to nod home.
The Real coach reacted by making three substitutions, which included veteran midfielder Modric. The dependable Croat, who has been at the club since 2012, provided the perfect delivery for Benzema to convert 11 minutes later.
Real continued to press and Casemiro went close with a firm strike before he played a key role in the final attack of the match.
Real talisman Benzema played a one-two with the Brazilian before striking a first-time angled shot beyond the reach of Elche keeper Edgar Badia.