Late goals from Gonzalo Higuain and Gokhan Inler allowed unconvincing Napoli to run out 3-1 winners against a battling Swansea City and book their ticket for the last 16 of the Europa League on Thursday.
Napoli sit third in Serie A but have slipped virtually out of contention for the league title and a series of mediocre performances, including last week's scoreless draw in the first leg in Wales, have placed question marks over Rafael Benitez's side.
But after Jonathan De Guzman levelled Lorenzo Insigne's 17th-minute opener, Higuain gave the hosts a 78th-minute lead before Inler settled some late nerves with Napoli's third deep in injury time.
Napoli will now meet Porto in the last 16 and Higuain, who scored his first goal in the competition after hitting four in the Champions League, told Mediaset: "We knew it would be a difficult match and after their equaliser it didn't get any easier.
"But we're happy with the win and to have secured qualification."
Despite Napoli enjoying home advantage, Swansea came looking for a result and were unlucky not to come away with more from the San Paolo.
The Premier League outfit sniffed an early opener when Marvin Emnes showed his pace down the right, drew out Pepe Reina and beat the 'keeper only for Raul Albiol to clear off the line.
Higuain shot over minutes later following Goran Pandev's delivery, but the Argentine helped make amends in the 17th minute when his glancing header allowed Insigne to beat the offside trap and chip Michel Vorm in the visitors' goal.
At the other end Wilfried Bony sent a header wide as Swansea started to build momentum, and the leveller finally came when De Guzman ran on to Bony's through ball and fired past Reina, although the Spaniard got a hand to his shot.
Napoli rode their luck throughout but Higuain finally restored the Italians' lead on 12 minutes from time.
Belgian Dries Mertens sent an innocuous-looking ball into the Swansea area, where a deflection produced a loose ball and allowed Higuain to fire past Vorm from close range.
Five minutes later Reina did well to save Dwight Tiendalli's header from a corner, while at the other end Higuain missed a golden chance for his brace when set up by Marek Hamsik.
Napoli's nerves were only really settled when Higuain and Hamsik combined to set up Inler for the Swiss to score Napoli's third in the third minute of added time.
Italian Cup holders Lazio were sent crashing out of the competition, conceding a late goal in Bulgaria to lose 4-3 on aggregate to Ludogorets Razgrad.
However another two Italian sides, Italian champions Juventus and Fiorentina, joined Napoli by coasting into the last 16.
Juve, who held a 2-0 first-leg lead over Trabzonspor, prevailed 2-0 in Turkey thanks to goals from Arturo Vidal and Pablo Daniel Osvaldo for an aggregate victory of 4-0.
The Serie A leaders will now meet Fiorentina after Vincenzo Montella's men drew 1-1 at home with Esbjerg for a 4-2 aggregate win over the Danes.