Karim Benzema's double took Real Madrid top of Group D as they held off a spirited Shakhtar Donetsk side in the Champions League.
Benzema tapped in the opener to record Real's 1,000th goal in European football's elite club competition.
The France forward swept in a second following good work from Vinicius Junior and Casemiro after Fernando had deservedly levelled for Shakhtar.
Sheriff Tiraspol host Inter Milan in Wednesday's other Group D game.
The Moldovan debutants could yet leapfrog Real by virtue of their head-to-head record if they beat the Italian champions.
Real boss Carlo Ancelotti will be thankful for Benzema's clinical contribution in a contest that saw his side flatter to deceive against opposition they had thrashed in the reverse fixture little over two weeks ago.
Luka Modric twice had good opportunities to put the hosts in front early on but they dropped off the pace after Benzema turned home the opener courtesy of a shocking mix-up between visiting goalkeeper Anatolii Trubin and defender Marlon.
Alan Patrick, who had earlier hit the post for Roberto de Zerbi's side, superbly chested the ball into Fernando's path for the equaliser, with the Brazilian forward lashing his effort past home goalkeeper Thibaut Courtois into the roof of the net.
But Benzema's second of the evening from a glorious move proved decisive for the hosts, who have now won four of their last five matches in all competitions.