Real Madrid crushed Ajax 4-1 at the Bernabeu on Tuesday but the Dutch side still finished third in Champions League Group D and have a shot at playing a Europa League final at their own Amsterdam Arena.
Ajax stayed above Manchester City, who finished bottom of the group after a 1-0 defeat at Borussia Dortmund.
Jose Callejon bagged a brace for a Real side already assured of second place and Cristiano Ronaldo and Kaka weighed in with one apiece as a weakened Madrid team swept aside the visitors.
Derk Boerrigter pulled one back in the 59th to make it 3-1 but Ajax never really looked like troubling the nine-times European champions.
"We finished third with a young team and we should be proud," Ajax coach Frank de Boer told a news conference.
"We now have the chance to reach the Europa League final at our own stadium. It won't be easy, there are some very good teams in the competition, but it would be a great prize."
De Boer said his team had a lot to learn from their defeat at the Bernabeu.
"I am disappointed we weren't at our best," he said. "Real Madrid are a great team but we had eight players who played below their level. Playing that way we will never achieve anything.
"These players have to learn to reach their best levels on occasions like these, only then can we hope to spring a surprise."
Real coach Jose Mourinho rested players such as Spanish internationals Iker Casillas, Sergio Ramos and Xabi Alonso, but their replacements were not overly stretched on a bitterly cold evening.
The only negative for Mourinho was left-back Fabio Coentrao having to be substituted in the first half with what appeared to be a hamstring problem.
The impressive Luka Modric won a tackle in midfield and played a ball over the top for Karim Benzema after 13 minutes.
The France striker controlled and then squared for Ronaldo to score his seventh Champions League goal against the Dutch team.
Modric then laid on Real's second in the 28th, spinning away on the halfway line and playing a long ball for Callejon who scampered into the area to score.
Kaka, wearing the captain's armband, brought the Bernabeu to its feet with a run and shot which curled into the top corner just after the re-start, earning applause from Mourinho on the touchline.
Ajax improved in the second half, however, and a weak punched clearance from reserve Real keeper Antonio Adan allowed Boerrigter to grab the visitors' a consolation goal.
For a while it looked like the visitors could grab a second but Callejon nodded a fourth at the end making it six wins in three seasons for Real over Ajax, with 20 goals scored and only two conceded.
Mourinho even had time to give 17-year-old youth team player Jose Rodriguez his debut, making him the club's youngest debutant in the Champions League.
"We have to respect everyone," Mourinho said, looking ahead to the last 16.
"But when you finish top of a group, you reckon you deserve a slightly weaker opponent. We will be facing a group winner and it will be tough, but this is something for February now."comments