A last-minute goal from Isco saw La Liga leaders Real Madrid snatch a dramatic 3-2 win at relegation battlers Sporting Gijon, where manager Zinedine Zidane had made some nine changes to his team.
Sporting, who started the day five points adrift of safety, had gone ahead on 14 minutes through a volley from Croatian forward Duje Cop, but Real were soon level when midfielder Isco drilled the ball into the top corner.
A looping header from Mikel Vesga put the Asturian side back in front five minutes into the second half.
Real, though, equalised again just before the hour through Alvaro Morata.
Just when it looked like the La Liga leaders had run out of time to conjure a winner, Isco drilled a low shot into the bottom left corner from the edge of the penalty area.
Zidane took no risks ahead of the return leg in Madrid and the upcoming Clasico, with Wales forward Gareth Bale rested as a precaution against a calf problem as he rotated the team from the midweek Champions League win at Bayern Munich.
Only captain Sergio Ramos and Fernandez Nacho retained their places as James Rodriguez, Lucas Vazquez, Morata and Marco Asensio all coming in along with Portuguese defender Fabio Coentrao for a rare start.
Sporting were looking to give themselves a lifeline in the battle to stay in La Liga, but were almost behind when Vazquez sent a close-range header over from a cross from Danilo.
It was, though, the hosts who swept into the lead after 14 minutes.
Mikel Vesga lofted the ball into the left side of the Madrid penalty area, and Croatian forward Cop was alert to volley a low shot past Francisco Casilla into the far corner.
Real, however, were soon back on level terms through a fine strike by Isco just three minutes later.
The midfielder cut inside from the right and fired the ball back over the Sporting keeper into the top-left corner.
The La Liga leaders remained on the offensive and had the ball in the net again just after the half-hour, but Vazquez was correctly flagged offside.
Madrid should have extended their lead at the start of the second half.
Rodriguez sent in a free-kick from the right, which Nacho headed down, but goalkeeper Ivan Cuellar made a superb save on the line and the ball ran across the face of goal with Morata unable to stab it home as he slid in at the far post.
It proved a costly miss as Sporting took the lead again after 50 minutes.
A deep free-kick was nodded back across the Madrid penalty area by Jean Babin and Vesga sent a looping headed up into the far corner to stun the LaLiga leaders again.
Once more Real looked for a swift response, but this time the Sporting defence remained composed.
Zidane made a change on 57 minutes as Coentrao was replaced by Brazilan Marcelo.
Real drew themselves level again just before the hour.
Danilo whipped a ball through the Sporting penalty area from the right and Morata got up at the far post to head in.
Having got themselves back into the match for a second time, the LaLiga leaders started to dominate possession as Sporting were forced to defend deeper.
Asensio saw his close-range effort chalked out for offside after the ball came back off the crossbar.
With 20 minutes left, Vazquez was replaced by Dominican Republic forward Diaz Mariano as Zidane looked to inject fresh life into the Real frontline before Rodriguez flashed a low drive wide.
Ramos sent his header off target from a corner before Isco finally broke through Sporting's tiring rearguard when he drilled a right-foot shot past Cuellar which nestled just inside the post.