Bayern Munich clinched their place in the Champions League last 16 by beating Olympiakos 2-0 at home on Wednesday as second-half strikes from Robert Lewandowski and Ivan Perisic secured their fourth win in Group B.
Playing their first game since coach Niko Kovac was sacked after the humiliating 5-1 drubbing at Eintracht Frankfurt, Bayern out-played the Greek champions but lacked composure in the area for large parts of the game.
They finally broke the deadlock in the 69th minute through Lewandowski, who continued his remarkable run of scoring in every Bundesliga and Champions League game this season.
The Polish striker prodded home a cross from Kingsley Coman from close range for his 21st strike in all competitions, setting interim boss Hansi Flick on the way to victory in his first game since being put in temporary charge.
Croatian winger Perisic claimed Bayern's second in the 89th to seal the win, slamming the ball home with his first touch less than 60 seconds after coming off the bench.
Bayern top Group B with 12 points from four games and will be confirmed as group winners if Red Star Belgrade's match with Tottenham Hotspur later on Wednesday ends in a draw.
"I'm very happy with the performance and that we have progressed. The situation hasn't been easy for the team but we managed to put into practice all the things we have been working on in training," Flick said.
"I think in the first half we didn't create enough clear-cut chances, so we need to try to do better there.
"The win was important as we wanted to qualify for the last 16 today. We managed that. It was also important how we played."
Olympiakos coach Pedro Martins was not pleased with his side's display as they struggled to work Bayern goalkeeper Manuel Neuer.
"Bayern pressured us a lot, constricting us on the pitch," he said. "We should have been faster in order to escape their stranglehold. We lost many balls. I was expecting more from my team. We could have done better."