Inter relied on two defenders to get them out of trouble as Stefan de Vrij and Alessandro Bastoni scored late on to snatch a 2-1 win at Parma in a dramatic Serie A clash.
With Antonio Conte watching on from the stands as he served a touchline ban, Gervinho's 15th-minute goal looked set to be enough for Parma to secure a valuable win in their push for Europe.
Yet Inter fought back in the closing stages – De Vrij rather fortunately turning home Lautaro Martinez's header before Bastoni headed in the winner three minutes later to consolidate Inter's place in third.
Bastoni's goal came almost immediately following the restart after Inter's equaliser, with Juraj Kucka's dismissal for dissent having caused a lengthy stoppage.
After drilling wide with his first attempt, Gervinho made no mistake with his second opportunity, calmly rounding Antonio Candreva and Danilo D'Ambrosio before slotting into the bottom-right corner.
A VAR check for an Andreas Cornelius handball looked set to result in Inter being awarded a penalty four minutes later, only for the officials to spot Diego Godin had been marginally offside.
Cornelius squandered two great chances to put Parma 2-0 up prior to the break, first blazing over when one-on-one with Samir Handanovic before slicing wide from Jasmin Kurtic's cross.
With Inter's substitute goalkeeper Tommaso Berni having received a red card for complaining from the bench, the visitors' comeback efforts seemed set to prove fruitless when Romelu Lukaku curled wide and Alexis Sanchez saw a stinging strike saved.
Yet their luck finally turned in the 84th minute – De Vrij in the right place to flick Martinez's header on into the net.
Kucka was given his marching orders while Inter celebrated, and Inter swiftly made their numerical advantage count as Bastoni headed in from point-blank range to deal the final blow to his former club.
What does it mean? Inter fending off Atalanta… for now
Atalanta's victory over Udinese earlier had lifted them to within a point of Inter, whose slim title hopes all but faded with a draw against Sassuolo last time out. However, the Nerazzurri have just about managed to keep their rivals – who they face in their final league game of the season – at bay.
Bastoni the hero from the bench
With Godin having struggled up against Cornelius and Gervinho, Bastoni was introduced in the 73rd minute, yet it was at the other end of the pitch that the former Parma youngster made a telling impact, having been in the right place at the right time to turn in his second Serie A goal for Inter.
Cornelius' misses prove costly
Inter were made to pay for Roberto Gagliardini's glaring miss against Sassuolo, but this time they were the benefactors of two dreadful attempts from Cornelius, who could have put Parma out of sight before the break.
Key Opta Facts
Inter have gained 32 points away from home this season, the most of any team in Serie A.
Inter have scored 13 headed goals in Serie A, at least two more than any other team this term.
De Vrij has been involved in six goals for Inter this season with three goals and three assists.
Gervinho is just the third Parma player to be involved in 10 or more goals in back-to-back Serie A seasons since 2004-05, joining Domenico Morfeo (2004-05 and 2005-06)
and Sebastian Giovinco (2010-11 and 2011-12).
Inter take on struggling Brescia on Wednesday, while Parma face Hellas Verona in a game that could prove key to both teams' European hopes.