German champions Bayern Munich needed two goals from their top scorer Robert Lewandowski to sneak past hosts Olympiakos 3-2 on Tuesday and remain top of their Champions League Group B.
The Bavarians were far from the form that saw them crush Tottenham Hotspur 7-2 in the previous matchday, and have now conceded two goals for the fifth straight game. They also had defenders Lucas Hernandez and Javi Martinez taken off injured.
The Greeks scored on the break when Kostas Tsimikas's cross found Youssef El Arabi at the far post and the Moroccan beat keeper Manuel Neuer.
Bayern, who have one point from their last two Bundesliga matches since beating Tottenham, recovered to level with Lewandowski in the 34th minute.
He then put them ahead, stabbing in from close range against the run of play in the 62nd for his 18th goal in 12 games in all competitions.
Corentin Tolisso added a third with a curled shot in the 75th before the Greeks cut the deficit with Guilherme's deflected effort four minutes later.
The win lifted Bayern to nine point from three games. Tottenham crushed Red Star Belgrade 5-0 to move up to second place on four, one ahead of the Serbs. Olympiakos are bottom with one point.
"We made it difficult for ourselves again and didn't have enough conviction," said Neuer. "We need to continue working on that, analysing and seeing what we can do better.
"The problem at the moment is that we need to score three goals every game to win because we keep conceding two."
While victory takes them a step closer to a spot in the knockout stages, it was far from a vintage performance from Bayern, who were again leaking goals.
They will also have to deal with the potential absences of Hernandez and Martinez, with Niklas Suele already out for months after tearing his cruciate ligament in his left knee on Saturday.
Hernandez, deployed into a central defender role in the absence of Suele, had to be taken off with what looked like a painful foot injury in the 58th minute. Martinez had left at halftime.
But even before that Bayern had looked vulnerable at the back with El Arabi taking full advantage of Suele's absence to head in for the lead in the 23rd.
Coach Niko Kovac looked frustrated at times by the way his team was performing and it took Lewandowski's scoring prowess to get them out of trouble once more.
Bayern thought they had wrapped it up when Tolisso netted their third but were again caught napping as the Greeks set up a dramatic finale.
However, they could not avoid their first home loss in Europe after a 10-game unbeaten run at their stadium.
"We are satisfied to have won here," Kovac said. "That was our goal and we knew it would be tough here. We have now taken a huge step toward the round of 16."