AC Milan maintained its lead in Serie A after beating relegation-threatened Genoa 2-0 on Friday.
Rafael Leão and Junior Messias helped Milan move back two points ahead of Inter after the defending champion won at Spezia 3-1 hours earlier.
Inter has played a match less than Milan as it still has to play a postponed match against Bologna.
The two Milan teams also meet on Tuesday in the second leg of the Italian Cup semifinals.
Milan was again going through an injury crisis and struggling for goals ahead of the match against Genoa. It went in on the back of two straight goalless draws and only scoring four goals in its last seven matches
Veteran forward Zlatan Ibrahimovic was out with a knee problem, the latest in a series of injuries this season.
Spezia 1-3 Inter
Substitute Lautaro Martínez returned from suspension to score one goal and set up another as Inter kept up the pressure on its city rival.
The Nerazzurri struggled to get going on a balmy day in Spezia and almost conceded early but Inter goalkeeper Samir Handanovi rushed off his line and grabbed the ball following a wayward interception from teammate Ivan Perisic.
Inter broke the deadlock in the 31st with its first shot on goal. Marcelo Brozovic started and finished the move as he chipped a pass into the area to Danilo D’Ambrosio, who nodded it back for the Croatia midfielder to drive into the top left corner.
Martínez, who missed last weekend’s win over Hellas Verona due to suspension, came off the bench on the hour mark and doubled his side’s lead 13 minutes later.
Perisic ran onto a cross-field pass to the left flank and cut inside before whipping in a low cross which Martínez flicked into the far corner with his back to goal.
Spezia captain Giulio Maggiore set up a nervy finale when he halved the deficit with a fine strike into the top left corner in the 88th minute, but Alexis Sánchez secured the result in stoppage time.
The referee waved play on after a foul on Sánchez and the Inter forward got back up to fire a Martínez assist into the bottom left corner.
There was a somewhat bizarre incident involving Spezia forward M’Bala Nzola. He came on in the 60th but the referee spotted his large earring and ordered him to remove it. Nzola spent several minutes fiddling with it on the touchline, aided by Spezia staff, but couldn’t remove it and had to be substituted, 10 minutes after coming onto the field.