Sporting CP beat 10-man Borussia Dortmund 3-1 on Wednesday with two goals from Pedro Goncalves to clinch their spot in the Champions League knockout stages and eliminate the Germans from the competition.
Goncalves struck twice in the first half to lead his team to their 10th straight victory in all competitions and nine points in Group C, three ahead of the Germans with a game left and a better head-to-head, after losing 1-0 in Dortmund in September.
Sporting made the most of a disastrous Nico Schulz clearance that sent the ball straight to Goncalves who flicked it past keeper Gregor Kobel after half an hour.
The midfielder, who also scored twice last week in their Portuguese Cup fourth-round win, rifled in from 20 metres nine minutes later to put Sporting firmly in the driving seat.
Dortmund, still without injured striker Erling Haaland, came out fighting after the break, looking for a goal that would keep their qualifying hopes alive, and had an effort ruled offside but lacked precision in their final pass.
Their hopes of a comeback, however, were dashed when Emre Can was sent off in the 75th for a foul on Pedro Porro.
Sporting earned a penalty four minutes later and Porro headed in the rebound after Kobel had saved Goncalves' spot-kick to deny him a hat-trick.
Dortmund, who scored in stoppage-time through Donyell Malen, were left wondering how a campaign that started with two wins could have brought no points from the next three matches.
The Germans will go into the Europa League as the third-placed team in the group. Ajax Amsterdam clinched top spot with a 2-1 win over bottom side Besiktas, their fifth victory in five matches.