Real Madrid's hopes of reaching the Champions League last 16 for a 24th consecutive season hang in the balance after Zinedine Zidane's side were beaten again by Shakhtar Donetsk.
The 13-time European champions are third in Group B with one game to play.
Dentinho and Manor Solomon struck in the second half for Shakhtar, who won the reverse fixture 3-2 in Madrid.
Borussia Monchengladbach can qualify as group winners with victory over winless Inter Milan later (20:00 GMT).
Zidane's side have struggled for consistency this season and suffered a shock 2-1 defeat by Alaves in La Liga on Saturday, extending their winless domestic run to three matches.
The Spanish champions, currently fourth in La Liga, were without injured pair Eden Hazard and captain Sergio Ramos but welcomed back talisman Karim Benzema for their return to the stadium where they were last crowned European champions in 2018.
Real started well as Marco Asensio hit the post after five minutes and Benzema drew goalkeeper Anatoliy Trubin into action.
Trubin then tipped over from Asensio's powerful shot before half-time and again denied Benzema, before substitute Dentinho pounced on Raphael Varane's error to score with the hosts' second shot on target after 57 minutes.
Rather than retreat, Shakhtar pushed for a second and got their reward eight minutes from time when Solomon fired into the bottom corner.
Shakhtar had not scored in three group games since beating Real in October and conceded a total of 10 goals in heavy back-to-back defeats by leaders Borussia Monchengladbach.
But the Ukrainian side, with their superior head-to-head record, now have the upper hand on Real going into next week's final round of fixtures.
Elsewhere, Lokomotiv Moscow lost 3-1 at home to RB Salzburg.