Gareth Bale inspired Real Madrid to come from two goals down to win 3-2 at Rayo Vallecano in a testing workout ahead of the Champions League clash with Manchester City.
Madrid were without Cristiano Ronaldo for the first time in a Primera Division game this season, due to a thigh problem, and their title bid looked in tatters when Adrian Embarba and Miku put Rayo 2-0 up in just 14 minutes.
Wales star Bale headed Madrid back into the game before the break and then grabbed the winner in the 81st minute after substitute Lucas Vazquez had equalised.
The euphoria of the comeback was punctured, however, by Karim Benzema being substituted after suffering a knock before half-time, and the Frenchman could miss Tuesday's European semi-final first leg in Manchester.
Ronaldo strained a thigh muscle at the end of the game with Villarreal on Wednesday, and head coach Zinedine Zidane made a number of changes, with the City clash in mind.
He brought in Isco for Luka Modric, and dropped Sergio Ramos to the bench to allow for the inclusion of Raphael Varane. Bale returned from injury while Casemiro was suspended and Mateo Kovacic stepped in for the Brazilian, and Jese started in place of Ronaldo.
Rayo have not beaten Madrid since 1997, and suffered a 10-2 thrashing at the Bernabeu in December.
This time Madrid nearly got off to a dream start, Bale smacking the post with a left-footed drive in the third minute, but it was the home side who took the lead to the delight of their raucous supporters.
Bebe freed himself of Danilo down the left to race into the area and hold off Pepe, squaring the ball to Embarba who rolled it in from six yards out for the seventh-minute opener.
The second goal also owed a lot to slack defending from Madrid. Varane could only head a corner down in the box and Miku reacted quickest, hitting the ball under Keylor Navas.
Bebe fancied a goal himself and tried his luck from outside the area, narrowly missing the target.
Madrid finally woke up around the half-hour mark, Kovacic getting to the byline and comically sending the ball out for a throw-in.
They got their first goal back from a corner, Bale glancing Toni Kroos's outswinging delivery from the right into the net to give the visitors a lift 10 minutes before half-time.
Madrid drew level in the 53rd minute from another header, as Benzema's replacement Vazquez met Danilo's cross and headed into the top corner.
Bale completed the comeback by anticipating a misplaced pass from a Rayo defender around the halfway line and racing single-mindedly into the box, firing across goalkeeper Juan Carlos to score his 18th league goal of the season.