Napoli head coach Walter Mazzarri was relieved to survive a "cursed" encounter with Cagliari and keep his side's slim Serie A title chances alive with a 3-2 victory.
Given league leaders Juventus' later triumph over AC Milan in Turin, defeat to the Sardinians at the Stadio San Paolo would have left Napoli all at sea in their unlikely bid to claim the Scudetto.
Victor Ibarbo's opener, therefore, made life difficult for the Azzurri before a Davide Astori own-goal and Edinson Cavani's 30th goal of the season established a 2-1 lead.
Cagliari hit back through Marco Sau only for Lorenzo Insigne to rise from the bench and rescue all three points for Napoli four minutes into stoppage time.
Mazzarri told sscnapoli.it: "We created so many good opportunites, but also wasted many of them. At half-time I was angry but I told the lads to keep cool and play the way they know they can.
"The victory is a well-deserved one. Nobody can deny we outclassed them with both our football and with the opportunities we created.
"Cagliari are a great team, I pointed that out before the match. As the game went by it almost seemed to be a cursed match considering the way things were developing.
"So I am satisfied with the result. Now we must go on like this, paying a lot of attention until the very end."
Should Napoli fail to beat bottom side Pescara next weekend, a Juventus win in the Turin derby will finally rule Mazzarri's men out of contention.
Cagliari boss Ivo Pulga will watch his side's game against Udinese from the stands after being dismissed for his overzealous protests in Naples.
The Rossoblu coach angered referee Andrea De Marco by demanding an end to prolonged debate over Marek Hamsik's disallowed goal just before half-time.
He told La Repubblica: "Maybe I was too impetuous but I don't think I offended anyone. I find it absurd that 10 players can go and complain to the referee for three or four minutes.
"I don't want it to become a regular thing that teams protest every single dubious situation.
"We needed a perfect game to emerge from the San Paolo intact. We managed to do so until the last 30 seconds, then we conceded Insigne's goal.
"But there have been times when we've managed to win games in stoppage time."