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.
Veteran striker Ibrahimovic revealed his decision to quit the game during an on-pitch ceremony following AC Milan's 3-1 win over Verona which ended their Serie A campaign
Milan have also reportedly inserted a release clause of 175 million euros which can only be exercised during a summer transfer window.
Giroud guided home a brilliant header from Davide Calabria's cross in the 40th minute to guarantee Milan at least fourth place and complete Italy's line-up in Europe's top club competition next season
Milan ended a run of three straight defeats, including two at the San Siro against Inter in the Champions League semi-final, with an emphatic victory over a team dead last in the table
A month ago, Inzaghi faced criticism and was under pressure after a lacklustre run of results, yet his side has turned it around and their 1-0 semi-final second leg win over Milan was their eighth in a row in all competitions
Inter will undoubtedly be the underdogs against either Real Madrid or Manchester City in Istanbul on June 10, but the way they managed both legs of this all-Milan tie suggests they will be hard to beat.
Pioli and his players had their heads bowed in remorse while Milan's hardcore ultras bellowed encouragement in the hope that their words might add something which was missing in the first leg. The Milan squad then headed to the dressing room as the Curva Sud chanted “we want 11 lions” in their native Italian.
AC Milan coach Stefano Pioli hopes to have Rafael Leao back for Tuesday's Champions League semi-final, second leg against city rivals Inter in which the Rossoneri will attempt to overturn a 2-0 deficit.
A Romelu Lukaku brace on his 30th birthday, a further strike from Lautaro Martinez and an unfortunate Ruan Tressoldi own goal were enough for Inter to claim a seventh straight win in all competitions and move level on 66 points with second-placed Juventus
AC Milan and Inter Milan secured matching 2-0 victories over Roman clubs as they briefly swopped places in Serie A ahead of their Champions League semi-final clash.