(CNN) -- Napoli stunned Manchester City 2-1 Tuesday to leave the English Premier League leaders struggling to qualify from Group A of the European Champions League.
Edinson Cavani put Napoli ahead in the first half before Mario Balotelli equalized for Roberto Mancini's men, who have failed to repeat their sublime domestic form in European competition.
Cavani scored the eventual winner just after the break to leave Napoli second in the group behind Bayern Munich, who beat Villarreal 3-1 to clinch their passage to the last 16 knockout stage.
It was a pulsating encounter in Napoli's San Paolo stadium, with the most intense drama reserved after Uruguay's Cavani, a reported transfer target for big-spending City, had beaten Joe Hart with a low shot to put his side 2-1 ahead.
City pushed forward in desperate hope of an equalizer but a mistake by Aleksandar Kolarov let in Marek Hamsik.
His shot beat Hart, it thumped the post and bounced clear.
Yaya Toure played in the ever dangerous Balotelli but Morgan De Sanctis did superbly to block the shot, while at the other end Hart denied Christian Maggio, who was clean through.
Finally, a brilliant move between David Silva and substitute Samir Nasri gave Balotelli a further opportunity, but he headed over.
City, who were beaten 2-0 by Bayern Munich in the infamous match in which Carlos Tevez allegedly refused to come on as a substitute, must now beat the German giants in their final group match at the Etihad Stadium to have any chance of going through.
But a Napoli victory over Villarreal in their last fixture would see the Italian club advance with Bayern regardless of that result.
Bayern made no mistake in their Allianz Arena as Franck Ribery and Mario Gomez put them 2-0 up inside 24 minutes. Jonathan De Guzman pulled one back for the visitors before Ribery, with his second, wrapped up the win.
City's illustrious city neighbors Manchester United are also making heavy weather of qualifying from Group C as they were held 2-2 at home by Benfica.
They fell behind to a Phil Jones own goal at Old Trafford before a neat header from Dimitar Berbatov, playing in place of the injured Wayne Rooney, saw the home side level.
When Darren Fletcher put Alex Ferguson's men ahead in the second half after a spell of intense pressure they looked set to wrap up the victory to take command of the group.
But a casual clearance from United goalkeeper David de Gea led to Benfica's equalizer as Bruno Cesar's cross slammed into Rio Ferdinand and fell to Argentina veteran Pablo Aimar, who gratefully accepted the chance.
Benfica and United are level on nine points, but the Portuguese side will go through as the group winners if they beat Romanian minnows Otelul Galati in their final group game in Lisbon next month.
They have a better head-to-head record with United, who must gain at least a point at Swiss side FC Basel to qualify for the last 16.
Basel, who beat Otelul Galati 3-2 on Tuesday, will go through with a win over United.