Two late goals by 19-year-old Nico Paz and Joselu gave Real Madrid a 4-2 fightback win against Napoli on Wednesday, securing the top spot in Champions League Group C with one round of matches remaining.
The 14-times champions, who had already secured qualification to the last 16, maintained their 100% record and have 15 points from five games, eight points ahead of the Italian champions.
Napoli, second on seven points, need a draw in their final game against Braga, third on four points, to qualify for the knockout stage.
Advertisement · Scroll to continue
Union Berlin are bottom on two points after a 1-1 draw against Braga earlier on Wednesday.
Real started well but were surprised by a quick counter-attack by the visitors, with Giovanni Di Lorenzo assisting Giovanni Simeone to open the scoring with a close-range strike in the ninth minute that at first sight looked like it had been saved by goalkeeper Andryi Lunin.
The referee let it stand as the goal-line technology confirmed that the ball had fractionally crossed the line.
Real hit back quickly, with Rodrygo equalising with a fine shot into the top corner two minutes later, and they went ahead with a Jude Bellingham header in the 22nd.
It was Bellingham's 15th goal in 16 games in all competitions for Real Madrid this season, making him the first player in the club's history to score in each of his first four European Cup games.
The Englishman has outdone last season's tally of 14 in 42 games with Borussia Dortmund and has surpassed the achievements of Real heroes Cristiano Ronaldo, Alfredo Di Stefano and Pruden Sanchez, who scored 13 goals in their first 15 games, and Ferenc Puskas, who had 11.
"He's spectacular in getting into the box, he comes into the box like a motorbike," Real manager Carlo Ancelotti told Movistar Plus.
"It's surprising because nobody could have imagined such fast adaptation here, to this club and the football he is showing. He surprises the fans, team mates and even rivals."
Real kept pressing and Brahim Diaz could have extended their lead in the 31st minute but his shot went just wide.
However, Napoli made the most of the first chance they had after the break with Frank Anguissa levelling the game from a rebound in the 47th minute, while Real suffered with several wasted chances by substitute Joselu, including an absolute sitter from close range in the 79th.
It was another substitute, academy midfielder Paz, who gave Real the lead again with a stunner from outside the box in the 84th minute.
Joselu ended up scoring the fourth goal with a tap-in in added time.
"It was a difficult, complicated match," manager Carlo Ancelotti told Movistar Plus.
"But during the most difficult part of the match we found the energy to win. The last 20 minutes were very good and changed the dynamic.
"We fought and competed until the end and we achieved our objective of finishing top of the group. Now, let's get some rest, we need it."