All Inter’s goals came after the break and Stefan de Vrij — who scored Inter’s third — put the Nerrazzurri transformation down to Antonio Conte’s halftime team talk.
“It was two different matches,” the Inter defender said. “The coach made us understand what wasn’t going well, what we had to do differently. He psyched us up to go back out onto the pitch differently, as we did.
“We believed right until the end. We knew it was a very important match for us, for the standings, for the fans, for the city and you saw that in the second half.”
It was a pulsating match at San Siro. Zlatan Ibrahimović scored one and set up another for Ante Rebic to give Milan a 2-0 lead at halftime but Inter was level less than 10 minutes after the break following goals from Marcelo Brozović and Matías Vecino.
De Vrij completed the comeback in the 70th minute and Romelu Lukaku sealed the result in stoppage time. Inter and Juventus, which fell to a shock defeat at Hellas Verona on Saturday, are a point ahead of Lazio after the capital side won 1-0 at Parma.
It was Milan’s first defeat since Ibrahimović rejoined the club at the start of the year.
“It’s difficult to explain. The first half was practically perfect. The second was completely the opposite,” Ibrahimović said. “We told ourselves to be careful in the first 15 minutes of the second half, but we conceded two goals and then from there everything went wrong.
“I think it shows a lack of experience. When you’re winning a match 2-0 you have to know how to control the match and manage it better.”
Inter was without captain Samir Handanović, after the goalkeeper fractured a finger, and Daniele Padelli again deputized between the posts, for only his second Serie A appearance since August 2016.
The Inter goalkeeper was at fault for Milan’s opening goal, in the 40th minute. Ibrahimović knocked down a cross and Padelli could only flap at it, allowing Rebic to prod into an empty net.
Ibrahimović got on the scoresheet himself on the stroke of halftime, nodding in at the back post after a corner was flicked on.
However, Inter reduced the deficit six minutes into the second half when Brozović volleyed into the bottom left corner from just outside the area.
And it was level three minutes later as Alexis Sánchez rolled the ball across the area for Vecino to slot home from close range.
Vrij headed in a corner to put Inter ahead for the first time.
Christian Eriksen almost scored his first goal for Inter since joining from Tottenham last month but his 30-yard free kick came off the frame of the goal.
Ibrahimović also hit the post with a header late on before Lukaku headed in at the other end.
Lukaku celebrated by taking off his shirt and putting it on the corner flag which he then raised above his head to the raucous cheers of the Inter fans.
Lazio has gone 18 rounds unbeaten for the first time in the club’s history
Lazio scored the only goal of the game at Parma four minutes before halftime. Luis Alberto floated in a cross from the right and it was nodded on for Felipe Caicedo to tap in from close range.
Napoli remained 11th after losing 3-2 at home to relegation-threatened Lecce.
Lecce is 17th, three points above the drop zone after 18th-place Genoa beat Cagliari 1-0.
Brescia drew 1-1 with Udinese and bottom club Spal lost 2-1 at home to Sassuolo.