Since Milan's triumph under Carlo Ancelotti in Athens 17 years ago Madrid have won the Champions League six times, three of those victories coming with Ancelotti in the dugout.
Antonio Conte's resurgent side wrapped the match up inside the first half, courtesy of an early Romelu Lukaku goal and a sensational strike by Khvicha Kvaratskhelia.
Defender Gabbia rose highest to thump home Tijjani Reijnders' free-kick in the 89th minute and give Milan a Serie A win which pulls them out of a miserable early season slump.
Inter and AC Milan on Friday rejected the project to modernise and restructure the iconic San Siro stadium which they share, city mayor Giuseppe Sala announced.
"Winning is hard but staying up there is even harder. We had to bounce back after drawing at Genoa and we managed to do that," said Darmian to Sky Sport.
Pioli left Milan after the 19-time Italian champions finished second last season, 19 points behind champions Inter Milan, and following lacklustre runs in the Champions League and the domestic cups.
The 37-year-old Giroud leaves as a big fan favourite and will be remembered in particular for scoring key goals in Milan's 2022 Serie A triumph, the only trophy he won in his three years in Italy.
The Milan board paid a warm tribute in the farewell statement to 58-year-old Italian Pioli.
Olivier Giroud confirmed on Monday that he will leave AC Milan at the end of the season to end his long career in Major League Soccer.
Inter rebounded from their first loss of the season midweek against Sassuolo thanks to a sensational second-half display from Martinez.
Portugal winger Leao netted his third goal in as many league matches in the eighth minute at a sodden San Siro to move Milan up to second on 12 points from five games
Newcastle held AC Milan to a goalless draw in Tuesday's opening match of their first Champions League campaign in two decades.
Stefano Pioli insisted on Monday that AC Milan have turned their attentions to the Champions League opener with Newcastle United after the local derby humiliation at the weekend.
Inter Milan laid down an early title marker on Saturday by handing out a 5-1 derby hammering to AC Milan and going it alone at the Serie A summit, while champions Napoli were held 2-2 at promoted Genoa.
Italy's Milan giants face off in Saturday's local derby which pits Serie A's form teams against one another in a match which will give an early indication of their title credentials..
Paris St Germain will kick off their quest for a maiden Champions League trophy in a strong Group F featuring Borussia Dortmund, AC Milan and Newcastle United following the draw on Thursday.
The 24-year-old is looking to give his club career a jump start at Milan after being sold by Chelsea and he was key to Stefano Pioli's side claiming the points in their opening match of the season
AC Milan, the football club which won a host of domestic and European titles under Silvio Berlusconi's ownership, called him "unforgettable" in a tribute after his death aged 86 Monday.
According to reports in Italy, a number of AC Milan stars are unhappy with owner Gerry Cardinale's decision to sack club legend Paolo Maldini.