Rayo Vallecano came from behind to beat Real Madrid 3-2 on Monday with the LaLiga champions failing to reclaim top spot in the standings after two consecutive games without a win.
Barcelona are top on 34 points, two ahead of Real Madrid and 10 ahead of third-placed Atletico Madrid. Following their third consecutive win, Rayo climbed to eighth place, two points off the European qualification spots.
Rayo opened the scoring five minutes into the game when midfielder Santi Comesana finished from inside the box but Real went ahead with two goals in four minutes.
The first came in the 37th minute when Croatian playmaker Luka Modric converted a penalty after Marco Asensio was fouled inside the box and the second came almost four minutes later with a towering header by Eder Militao.
However, Rayo forward Alvaro Garcia scored the equaliser just before halftime, scrambling home a loose ball.
Rayo were then given a penalty of their own in the 67th minute after a handball by defender Dani Carvajal inside the area. Real's Thibaut Courtois stopped Oscar Trejo's effort but the kick had to be retaken because the goalkeeper left his line too early.
Trejo didn't waste his second chance, scoring what proved to be the winner with a tidy finish to the goalkeeper's left.