Milan reached the last 16 of the UEFA Champions League by holding Ajax to a goalless draw despite playing much of the game with 10 men.
Milan captain Riccardo Montolivo was sent off for a lunge on Christian Poulsen after only 22 minutes at San Siro, but Ajax were unable to secure the victory they needed to progress from Group H.
Poulsen was denied by the post before Montolivo saw red and Serie A outfit Milan dug deep with a dogged defensive display to secure second place behind Barcelona.
Ajax were totally dominant but failed to make the most of their numerical advantage as they missed a golden opportunity to reach the last 16 for the first time in eight years and were forced to settle for a UEFA Europa League spot.
Fit-again Milan striker Stephan El Shaarawy made his first start since August, while right-back Mattia De Sciglio also returned in one of five changes made by Massimilano Allegri.
Poulsen, Bojan Krkic and Stefano Denswil all came in for Ajax, who started brightly and nearly took the lead in the fourth minute.
Manager Frank De Boer insisted the Eredivisie champions had nothing to lose at the San Siro and they were only denied by the woodwork as Poulsen's glancing header struck the far post from a Lasse Schone corner.
Ajax were brimming with confidence and recalled Milan goalkeeper Christian Abbiati got down well to tip Davy Klaassen's header around the near post.
Milan's hopes of progressing to the last 16 then suffered a major setback when Montolivo was given his marching orders by referee Howard Webb for a reckless late challenge on Poulsen.
Allegri was forced into a reshuffle as a result, as El Shaarawy's comeback was short-lived, with Andrea Poli replacing him in a bid to bolster Milan's midfield.
De Boer replaced defensive midfielder Poulsen with striker Danny Hoesen at the break and the visitors piled on the pressure at the start of the second half, with Viktor Fischer firing over the crossbar from the edge of the penalty area.
Klaassen then fired straight at a grateful Abbiati from 20 yards out as Ajax continued to probe and the tension mounted.
Abbiati was called into action again after 65 minutes to save with his feet to keep out Fischer's drilled right-foot strike after some lovely build-up play.
Klaassen spurned a great chance when he scuffed a shot wide of the far post 17 minutes from time as Ajax's frustration built and Denswil fired wide in a feisty finale.
Then midfielder Klaassen was narrowly off target with the last kick of the game as a gutsy Milan side stood firm on a frustrating night for the Dutch giants.
|2||M. De Sciglio||89'|
|34||N. de Jong||83'|
|92||S. El Shaarawy|
|Coach: M. Allegri|
for S. El Shaarawy 24'
for Kaká 81'
|Lampard welcomes ´perfect´ NYCFC challenge|
|Shamrock Rovers 3 Progres Niederkorn 0: Waters at the double|
|Gerrard keen to emulate ´hero´ Beckham at Galaxy|
|UEFA Champions League Review: Red Imps make history, TNS breeze through|
|Ameobi extends Newcastle deal and heads for Cardiff|
|U.S. women celebrate World Cup victory with LA rally|
|Atletico agree Vietto deal|
|Silva appointed Olympiacos head coach|
|Presidential candidates unsure of Turan´s Barca switch|
|Toure keen to bounce back from ´disappointing´ campaign|
|El Salvador v Canada: Floro targets Gold Cup learning curve|
|Juve complete Zaza swoop|
|Costa Rica v Jamaica: Borges confident Wanchope´s men are ready|
|Marseille snare Sarr|
|Italy coach Conte to stand trial in match-fixing case|
|Castan keen to repay Roma´s faith|
|Rami thrilled to reunite with ´best coach´ Emery at Sevilla|
|Lusitans v West Ham: Tomkins seeks to silence minnows|
|Kagawa shines as Dortmund hit six in Japan|
|Alonso tips Gerrard for Galaxy glory|
|Firmino seeks self-improvement with Liverpool|
|Buffon bids farewell to Pirlo|
|Sterling named Europe´s ´most valuable´ young player|
|Casillas´ agent reveals Porto offer|
|Southampton bring in Martina|
|Dundee United accept Celtic´s Ciftci bid|
|McArthur pens new Palace deal|
|Bartomeu rules out Barca move for Pogba this year|
|Spurs have to be better now - Bentaleb|
|Milner expects central role|
|Micronesia thrashed again, this time 46-0|
|Marchisio: I cannot be Pirlo´s heir|
|Inter aiming for Champions League return - Icardi|
|UEFA Europa League Preview: Brondby and Slovan to protect handsome leads|
|Bentaleb pens new long-term deal at Tottenham|
|Barca agree Turan deal|
|FIFA bans Mayne-Nicholls|
|United States v Honduras: Klinsmann demands improvement ahead of Gold Cup opener|
|CONCACAF institutes extensive reforms in wake of FIFA corruption scandal|
|Mauri completes Milan move|
|City sign Turkey striker|
|Women´s World Cup final draws huge US TV ratings|
|My first Chelsea team better than current crop - Drogba|
|Bertrand set for lay-off after knee surgery|
|New five-year Juve deal for Marchisio|
|Allegri extends Juve contract|
|Koeman reiterates Alderweireld interest|
|Valencia bag Bakkali|
|New York City FC complete Pirlo capture|
|Panama v Haiti: Collat ready to challenge the best of CONCACAF|
|UEFA Champions League Preview: Harrison eyes TNS progression|
|FIFA sanctions Yemen for fielding ineligible player|
|Toulouse rubbish Ben Yedder exit reports|
|Mourinho ´knows what he´s doing´ with Falcao signing|
|Watford shell out club-record fee for Capoue|
|Braafheid signs Lazio extension|
|Nani finalises Fenerbahce move|
|Liverpool confirm O´Driscoll appointment|
|Liverpool have to start better - Lucas|
|USA simply too good - Sasaki|
|Portland Timbers 1 San Jose Earthquakes 0: Jewsbury wins it in stoppage time|
|No move yet for Van Persie|
|Lloyd wins Golden Ball, Silver Boot awards|
|Mascherano: I never grabbed Banega|
|Dunga requested Brazil not appeal Neymar´s suspension|
|United States 5 Japan 2: Lloyd stars with hat-trick|
|Fiorentina deny Inter criticism|
|Nani relishing Fenerbahce opportunity|