Ivan Perisic and Eder rescued Inter late on as they came from a goal behind to beat Chievo 3-1 and stay in touch with the top three.
The San Siro side's four-game winning streak in Serie A looked like coming to an end following some impressive goalkeeping from Stefano Sorrentino, but Perisic handed his side the lead with five minutes remaining before Eder put the match to bed in stoppage time.
The Nerazzurri had climbed up to seventh place in the table following their recent good run of form, just five points behind third to revive their Champions League hopes.
Things did not go as expected for Stefano Pioli's side in the opening 45 minutes, though. They created chance after chance, but it was the visitors who went a goal ahead when Sergio Pellissier found the net from a corner.
Inter pushed hard for an equaliser and eventually got what they deserved with 20 minutes left, Mauro Icardi netting his 15th goal of the season, before Perisic and Eder sealed the win in the closing stages to lift the hosts into sixth.
-- F.C. Internazionale (@Inter_en) January 14, 2017
Inter made an encouraging start and Icardi was unfortunate not to open the scoring early on when he headed just wide after some good work from Cristian Ansaldi down the left.
Stefano Pioli's men continued to dominate and new arrival Roberto Gagliardini was next to try his luck, testing Sorrentino with a powerful low strike that forced the Chievo goalkeeper into a strong save at his near post.
Antonio Candreva then threatened twice from long range, before Pellissier handed Chievo the lead completely against the run of play. Valter Birsa curled in a corner from the right and the veteran striker outmuscled his marker before beating Samir Handanovic with a volley from close range.
The home side remained unperturbed and the impressive Gagliardini came close to a debut goal for a second time in the 38th minute, Sorrentino only just managing to push his header wide and prevent the equaliser, while Perisic aimed a powerful shot inches wide of the top corner in the dying minutes of the first half.
Things nearly went from bad to worse for Inter early in the second half, Pellissier almost doubling his tally with a powerful strike from the edge of the box.
Inter continued to create plenty of chances, however, and Perisic had his arms up in disbelief in the 53rd minute when Sorrentino pulled off yet another superb save to keep out his header from five yards out.
Pioli brought on Eder for Ansaldi as Inter went in search of an equaliser and the Italy international quickly made his presence known with a fine free kick that caused Sorrentino plenty of problems.
An equaliser was inevitable and Icardi eventually restored parity in the 69th minute, tapping home from close range after a sublime cross from Candreva.
But Inter were not finished and Perisic became his side's hero with time running out as he beat Sorrentino with a low shot after cutting in from the left.
Eder then had the final say well into stoppage time, netting Inter's third with a placed effort to secure all three points and a fifth league win in a row.