Bayern Munich suffered a second-half scare before sealing a 3-2 win over Napoli in the Champions League to stay top of Group A on Wednesday as both teams finished with 10 men.
Having cruised to a 3-0 lead at the break thanks to Mario Gomez's first-half hat-trick, Bayern were left rattled as Argentina defender Federico Fernandez scored the second of two headers with ten minutes left to set up a tense finale.
Gomez's treble means he has now scored 19 goals in all competitions this season for Bayern and this was the ninth time he has scored three goals or more for Munich since joining from Stuttgart in 2009.
"We put in an exhilarating first-half, that was real fun," said Gomez.
"I was lucky enough to be the one in the middle for the three goals."
After Manchester City's win over Villarreal in Spain, Bayern are now three points clear at the top of Group A with two games remaining.
Defeat means Napoli drop to third in the table and will be without Colombia winger Juan Zuniga for their next game at home to City on November 22 after he was sent off after receiving a second yellow card.
Likewise, Bayern will be without Germany defender Holger Badstuber for their next game at home to tailenders Villarreal the same night as he was also sent off for two yellow card offences.
Bayern's victory may have come at a heavy price as Germany star Bastian Schweinsteiger was stretchered off in the second-half and taken to hospital with a suspected dislocated right shoulder.
"We really missed Schweinsteiger in the last 30 minutes as we just stopped putting moves together," added Gomez.
Bayern opened the scoring on 17 minutes when Gomez turned his defender and smashed his shot past Napoli goalkeeper Morgan De Sanctis.
The 26-year-old then left the Italians reeling when he netted his second just six minutes later.
A long-range pass from Germany colleague Toni Kroos found him unmarked at the far post and with the Napoli defence desperate for him to be offside, the flag stayed down and he volleyed home to make it 2-0 after just 23 minutes.
To add injury to insult, while Napoli struggled to get a replacement on for injured defender Salvatore Aronica, the hat-trick was completed on 41 minutes when De Sanctis parried a Kroos shot and Gomez had an easy tap in.
Napoli started the fight-back when Fernandez headed home on 45 minutes.
It was the first time Bayern have conceded a goal in Munich since August 7, having scored 36 goals in the process.
Napoli were reduced to ten men when Zuniga hauled down Ribery on 70 minutes, just a minute after earning his first yellow for a similar offence and referee Bjorn Kuipers had no hesitation in giving him a second booking and the red card.
Badstuber followed soon after for a heavy foul on Edinson Cavani on 77 minutes which saw him earn his second yellow of the game before Fernandez struck again to set up a tense final ten minutes.