Karim Benzema scored just hours after being found guilty by a French court in a blackmail case as Real Madrid saw off Sheriff Tiraspol 3-0 on Wednesday to reach the Champions League knockout stage.
Benzema scores as Real Madrid beat Sheriff to reach last 16
David Alaba celebrates with Eder Militao after scoring the opening goal
The France striker notched his team's third goal of a confident display in Transnistria, as Real exacted revenge for their shock 2-1 loss to Sheriff in Madrid earlier this season.
The victory sends the Spanish giants back to the top of Group D, two points clear of second-placed Inter Milan, who also qualified for the last 16 after beating Shakhtar Donetsk 2-0.
Madrid now only need to avoid defeat in their final group game against Inter at the Santiago Bernabeu to finish first in the group.
"We continue along the right path. I like the way we're playing," said Real coach Carlo Ancelotti, whose side beat Inter 1-0 in their first group game in September.
"The squad is in good shape, everyone is strong physically. It's important for us to finish top and we'll be looking to end our group campaign the way we've begun it."
The defeat ends Sheriff's hopes of progressing, but a memorable debut Champions League campaign has already secured third place and a spot in the Europa League knockout phase.
Benzema, who was given a one-year suspended sentence for complicity in a bid to blackmail his former France team-mate Mathieu Valbuena, had an early effort ruled out for offside.
Madrid were dominant but struggled to find a way through, with Rodrygo shooting tamely at home goalkeeper Giorgos Athanasiadis in the 18th minute.
But the away side did forge ahead on the half-hour mark through David Alaba.
The Austrian defender's free-kick was deflected by the Sheriff wall and past the helpless Athanasiadis.
The hosts were struggling to get out of their own half and Dani Carvajal almost added a second for Real when he volleyed narrowly over the crossbar.
The 13-time European champions did double their advantage in first-half stoppage time, though, as a fantastic move was ended by Toni Kroos' first-time shot which flew in off the crossbar and was awarded by goalline technology.
Benzema got his goal in the 55th minute, finding space on the edge of the box and drilling the ball into the bottom corner to score for the 15th time this season.
It was also the 76th goal of the striker's Champions League career.
"We have not talked about it (the court verdict), he is calm, it is a subject concerning him that we have been talking about for a long time," Ancelotti said.
There was a worry for Real as Alaba hobbled off in the 65th minute to be replaced by Nacho, but Ancelotti said it was not a serious injury.
"We took Alaba off because he twisted his ankle slightly, but I really don't think it's a bad problem," added the Italian. "We are pretty confident that he'll be ready for the upcoming games."
Sheriff had scored in each of their first four group games and had a flurry of chances midway through the second half, with Real goalkeeper Thibaut Courtois making two saves and a cross hitting the post.
But it was ultimately a comfortable outing for Madrid as they made the knockouts for a 25th consecutive year.