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'
|Zeljeznicar 2 Metalurg Skopje 2 (agg 2-2): Visitors advance on away goals|
|Gibson returns as Tranmere hold Everton|
|UEFA Champions League Review: Celtic coast through, BATE given scare|
|Gomez and Jones feature in Sunderland win|
|Leicester hit Ilkeston for six|
|Austin fires QPR to narrow victory|
|Guardiola: No trophies and I may be sacked|
|Dortmund held as Immobile makes debut|
|Rodriguez´s dream becomes Real|
|Garcia: Benatia and Ljajic going nowhere|
|Stoke secure Bojan on four-year deal|
|FA: No World Cup bids for England|
|Kroos commits to Bremen|
|Caulker makes QPR move|
|Forest agree Hunt loan deal with Palace|
|Bartra ready to prove himself at Barca|
|Southampton looking to sell Osvaldo|
|Marveaux loaned to Guingamp|
|Mourinho eyes success on two fronts|
|Sammer encouraged by Lewandowski start|
|PSG punished for abuse of Chelsea fans|
|Dunga unveiled as Brazil coach|
|Shakhtar CEO: Focus is on players´ safety|
|Foster agrees new West Brom deal|
|Real Madrid sign Rodriguez|
|Mustafi eyes Bundesliga switch|
|Klopp laughs off Hummels, Reus speculation|
|Campana makes Sampdoria switch|
|Leicester seal Ulloa deal|
|Morata sidelined for seven weeks with knee injury|
|Riviere on target in comfortable Newcastle win|
|Advocaat set for Serbia role|
|Wisdom joins West Brom on loan|
|Bundesliga to consider vanishing foam|
|Five-man shortlist for Ivory Coast|
|´Personal issues´ keep Gervinho away from Roma tour|
|Jedinak raring to go|
|Borini set for Liverpool stay, claims agent|
|Koeman: No bids for Lovren|
|Livermore: England hopes shouldn´t hinge on club side|
|MLS Preview: Tough tests for Conference leaders, Revolution still struggling|
|Mathieu not Barca material, says Marquez|
|West Brom claim unimpressive win in Sacramento|
|Neymar: Brazil behind Germany, Spain|
|Vietnamese police confirm match-fixing players|
|Lucescu blames Joorabchian for AWOL players|
|Robinho undecided on future|
|Rush: Still years left in Gerrard|
|Tiago re-signs with Atletico|
|Puyol against Spain overhaul|
|Agger considering his Liverpool future|
|Peruvian Primera Division Review: Juan Aurich bounce back, Melgar draw with Inti Gas|
|Bayern deny interest in Cuadrado|
|New signings on show in Hull double-header|
|Hooiveld strike sinks Swindon|
|Costa departs Valencia|
|Morata suffers knee injury in training|
|K.League Preview: Seoul, Sangju aim to close gap to sixth, Ulsan host Jeonbuk|
|Lewandowski off the mark on Bayern bow|
|Gerrard retirement will boost Liverpool - Carragher|
|World Cup bidding report due in September|
|Evra bids emotional farewell to United fans|
|J.League Preview: Ventforet Kofu look to escape drop zone, Sagan Tosu battle Kawasaki Frontale|
|Salah spared military service|
|Garcia would welcome Torres return|
|Livermore understands Ince decision|
|Cole happy to get away from English press|
|Evra seals Juve switch|
|Bayern stay was Kroos´ ´priority´|
|Scuffet: Udinese right place to continue developing|
|Gerrard retires from England duty|
|Ambitious Pochettino targets title|
|Aspas eager to put ´bad season´ behind him|
|Atletico Mineiro v Lanus: Visitors out to recover from first-leg loss|
|UEFA Europa League Preview: Sligo, Inter Baku out to finish shocks|
|Hughes expects Bojan decision soon|
|Cech on the mend - Holland|
|Pardew eager to honour crash victims|
|Prandelli hits back at critics|
|Negredo breaks metatarsal|
|Rooney eager to impress Van Gaal|
|Palacios´ Qatar move falls through|
|Wenger rules out striker signing|
|Six Shakhtar players refuse to return|
|Six Vietnamese footballers arrested for match fixing|
|Copa Libertadores Preview: Nacional Asuncion, San Lorenzo to host first legs|
|Mata hopeful of title|
|Napoli bullish about Scudetto chances|
|Colombian Primera A Review: Patriotas Boyaca, Deportes Tolima start with wins|
|Subotic thrilled to be back|
|Germain: Monaco can replace Rodriguez|
|Sullivan confident of Carroll improvement|
|Callejon staying put|
|DC United 3 Chivas USA 1: DC end Chivas´ winning run|
|Liga MX Review: Goalkeeping howler costs champions Leon, Monterrey move top|
|Chilean Primera Division Review: Huachipato, Santiago Wanderers opening-day winners|
|Brazilian Serie A Review: Internacional rout Flamengo, Cruzeiro win again|
|Prosinecki keen on South Korea job|