Polish striker Arkadiusz Milik's superb injury-time free-kick grabbed a 1-0 win for Napoli over Cagliari to pull Carlo Ancelotti's side back to within eight points of leaders Juventus in Serie A on Sunday.
Milik scored the winner in the 91st minute in Sardinia with a perfectly curled effort which left Cagliari goalkeeper Alessio Cragno with no chance.
Champions Juventus had pulled 11 points clear on Saturday after Cristiano Ronaldo scored his 11th league goal of the season from the penalty spot in a 1-0 derby win over Torino.
Ancelotti had rung the changes after Napoli's Champions League exit to Liverpool during the week but the visitors struggled in attack and the well-organised Sardinians.
Milik had a chance to break the deadlock on 68 minutes but his header hit the bar, with Cragno rushing to prevent Kalidou Koulibaly's attempted finish from the rebound.
But Napoli poured forward in search of the winner with Milik settling the game with his eighth goal of the season and fourth in three games.
"Anfield was a big blow, but the lads immediately responded as I expected them to," said Ancelotti.
"I chose a fresher initial lineup to give us energy throughout the match. It was a mature victory with intensity, we could have scored first and the performance grew in intensity.
"The team is doing well, we're competitive in the league, as we were in the Champions League and we want to be in the Europa League and the Italian Cup."
Cagliari, in 13th position, suffered their first home defeat of the season.
Roma host Genoa later Sunday with coach Eusebio Di Francesco's future in jeopardy with the capital side sitting 11th.
Earlier, Fiorentina ended their eight-match league winless streak with a 3-1 comeback win over Empoli, and are now four points off AC Milan in the final Champions League spot.
Rade Krunic got Empoli off to a bright start in the Tuscan derby, tapping in after 24 minutes.
But Giovanni Simeone crossed to Kevin Mirallas who fired in five minutes before half-time for the former Everton winger's second goal in as many games.
Simeone nodded in the third just before the hour mark with Bryan Dabo sealing the win on 78 minutes to end Empoli's good recent run of ten points from four matches.
Sassuolo got back to winning ways by beating second-bottom Frosinone 2-0, with a Lorenzo Ariaudo own goal before the break and Domenico Berardi's 58th-minute strike.
Fabio Quagliarella, meanwhile, continued his fine form, scoring his seventh goal in his sixth straight Serie A game to seal a 2-0 win for Sampdoria over Parma.
Gianluca Caprari scored the opener after 66 minutes in Genoa with Quagliarella further punishing Parma with a second three minutes later.