Lautaro Martinez scored the decisive goal from the penalty spot as Inter beat AC Milan 3-2 in a wild and woolly San Siro derby on Sunday.
Inter held off the hosts' late charge to move clear of their rivals in the Serie A table and bounce back from their midweek Europa League exit to Eintracht Frankfurt.
Defeat ended a run of six straight wins for Milan and could prove costly in their quest to nail down a Champions League berth for next season.
Inter had made a flying start to ease the pressure of their recent poor form, with Martinez heading down an Ivan Perisic cross for Matias Vecino to volley the opener after just three minutes.
But in a hint of the non-stop action that was to come, Milan almost levelled five minutes later when Lucas Paqueta forced a fine save out of Inter keeper Samir Handanovic.
Martinez was denied the chance to extend Inter's lead through a fine saving challenge from Davide Calabria before Paqueta headed just wide for Milan and at the other end Vecino fired just over the bar.
As Inter began to wrest control, defender Milan Skriniar sent a free header over the bar from a corner and Vecino headed another chance too high as Milan were left to cling on to their one goal deficit at half-time.
The seemingly inevitable second goal arrived six minutes into the second half when Stefan De Vrij was left free in the box to send a looping header over Gianluigi Donnarumma.
But Milan responded by reducing the deficit within six minutes, Tiemoue Bakayoko grabbing his first goal for the club with a neat header from Hakan Calhanoglu's floated free-kick.
Donnarumma denied Skriniar but could do nothing about the 67th-minute penalty drilled home by Martinez after Samu Castillejo was adjudged to have tripped Matteo Politano in the box.
To their credit, Milan began to besiege the Inter box as they battled to come back into the match and their persistence paid off in the 71st minute when they once again reduced the arrears.
Mateo Musacchio was on hand to blast home the rebound from close range after Handanovic had initially performed heroics to prevent an own goal from defender Danilo D'Ambrosio.
The goal breathed more life into the Rossoneri with Handanovic having to be alert as he raced from his goal to clear up after a dangerous Calhanoglu through-ball.
Milan then thought they had Andrea Conti sent off for a foul on Martinez only for the decision to be reversed by VAR as tempers began to fray on the bench.
There was still time for Milan to threaten to grab an unlikely point as Handanovic saved well from Castillejo before a last-gap effort from Patrick Cutrone was cleared off the line by D'Ambrosio.
ga('create', 'UA-72310761-1', 'auto', {'name': 'pacontentapi'});
ga('pacontentapi.set', 'referrer', location.origin);
ga('pacontentapi.set', 'dimension1', 'By Press Association Sport staff');
ga('pacontentapi.set', 'dimension2', '434c4d14-b3af-4eea-a26a-765d9053c1c1');
ga('pacontentapi.set', 'dimension3', 'paservice:sport,paservice:sport:football,paservice:sport:match-reports,paservice:sport:uk,paservice:sport:world');
ga('pacontentapi.set', 'dimension6', 'story');
ga('pacontentapi.set', 'dimension7', 'composite');
ga('pacontentapi.set', 'dimension8', null);
ga('pacontentapi.set', 'dimension9', 'sport:football');
ga('pacontentapi.send', 'pageview', { 'location': location.href, 'page': (location.pathname + location.search + location.hash), 'title': 'Inter claim Milan derby spoils'});