Cristiano Ronaldo set another Champions League record as holders Real Madrid sealed their place in the knockout stages with a comprehensive victory against Apoel Nicosia.
Zinedine Zidane's team had the match won by half-time with goals from Luka Modric, Fernandez Nacho and a Karim Benzema double. Cristiano Ronaldo got his customary goals early in the second half as his two strikes saw him reach 18 goals in the competition in 2017 -- more than any single player in a calendar year.
However Madrid, who have lifted the trophy in each of the past two years, will only qualify as runners-up in Group H after Tottenham came from behind to beat Borussia Dortmund 2-1 in Germany to ensure top spot.
The final match day next month will see the Europa League qualification spot contested between Apoel and Dortmund, who both have two points from their five matches. Apoel will travel to Tottenham while Dortmund face Madrid at the Bernabeu.
Ronaldo worked Apoel goalkeeper Nauzet Perez early on and narrowly missed the target with a couple of long-range efforts before Modric made the breakthrough after 23 minutes with a low strike that Perez could only palm into the side of the net.
Real were sloppy in the Madrid derby at the weekend and there had been signs of a continuation of that prior to the goal. Apoel almost punished them just before the half-hour mark but Roland Sallai's header dropped just wide.
Zidane's team responded by hitting their opponents with a flurry of goals either side of the half-time whistle.
Benzema raced through the middle to score after 39 minutes and two minutes later Nacho flicked the ball home from a Raphael Varane header following Toni Kroos' corner. Good link up play between Ronaldo and Benzema presented the France international with an easy goal before the break.
Ronaldo headed the fifth goal four minutes after the restart from a Marcelo cross and the competition's leading scorer was at it again in the 54th minute when he hooked the ball into an unguarded net after Benzema had blocked a clearance from the goalkeeper following an under-hit pass back.
Real's biggest win in the Champions League is 8-0 against Malmo, a record shared with Liverpool who beat Besiktas by the same score, and they had that in their sights.
Ronaldo and Benzema were also both chasing the match ball and both came within a whisker of getting on the end of a Dani Carvajal cross to complete their hat-tricks. Marco Asensio then saw an effort saved by the legs of Perez midway through the second half.
Madrid appeared to take their foot off the gas thereafter but substitute Borja Mayoral missed a glorious chance to score a seventh when he slipped at the crucial moment after 82 minutes.