Cristiano Ronaldo scored for the 11th consecutive away Champions League game to earn Group B winners Real Madrid victory in Basel.
The ex-Manchester United forward struck early on as the Spaniards maintained their 100% start in Europe.
Ronaldo has now scored 71 Champions League goals, moving to within three of Lionel Messi, who broke the competition goalscoring record on Tuesday.
The winning goal came as Ronaldo converted Karim Benzema's cross.
The Portuguese international might have added a 72nd Champions League goal to that close-range finish but dragged a shot just wide from Gareth Bale's cross in the second half.
Welshman Bale could also have made it a more convincing night for Real, who were already guaranteed top spot, when he fired an effort on to the crossbar but Real still secured a victory that makes it 15 straight wins in the competition for the 2014 winners.
Basel, who went close after 17-year-old Breel Embolo rounded Champions League debutant Keylor Navas, now need a point at Liverpool in two weeks' time to join Real in the knockout stages.
It was also a good night for the other side from Madrid as a Mario Mandzukic hat-trick ensured Atletico progressed with a 4-0 win over Olympiakos, Raul Garcia scoring the opener.
Juventus also look likely to advance from Group A as goals from Fernando Llorente and Carlos Tevez gave them a 2-0 win in Malmo.
Group C is shaping up for an exciting final day with Monaco and Zenit St Petersburg facing each other for a place in the knockout stages.
Monaco claimed a surprise 1-0 win in Bayer Leverkusen as substitute Lucas Ocampos struck against the run of play just two minutes after coming on. However, Leverkusen qualified despite the defeat.
Earlier in the day, Benfica were eliminated after going down to Danny's late goal in St Petersburg.
With Arsenal and Borussia Dortmund qualifying from Group D, Anderlecht and Galatasaray took part in match for the minor placings.
Two goals from Chancel Mbemba won it for the Belgian side to ensure defender Anthony Vanden Borre could taste his first ever Champions League match victory after 15 losses and eight draws.