Robert Lewandowski marked his 100th Champions League appearance with a hat-trick as Bayern Munich beat Benfica to reach the knockout stages.
Lewandowski headed in Kingsley Coman's cross and then set up Serge Gnabry's backheel finish.
Morato pulled one back before Lewandowski had a weak, low penalty saved in the centre of the goal.
Leroy Sane's sweet half-volley and two Lewandowski chips, either side of a Darwin Nunez goal, sealed victory.
Lewandowski's second involved a wonderful first touch and finish from Sane's pass - and he then latched onto Manuel Neuer's long ball and dinked the ball over Odysseas Vlachodimos from near the edge of the box.
Poland striker Lewandowski has now scored 81 Champions League goals - including four hat-tricks - in his 100 appearances.
He has scored 22 goals in 18 games for Bayern this season - including eight in four in the Champions League.
Bayern, who have won all four games and scored a joint-record 17 goals at this stage, are six points above second-placed Barcelona while Benfica are third on four points.