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'
|Burnley 2 Watford 0: Landmark goals for Hendrick and Keane seal first win in four|
|Schmidt lauds hitman Hernandez|
|Klopp not banking on Liverpool winning title|
|Kroos plays down Ronaldo rage rumours|
|Confidence coursing through Copenhagen|
|Madrid form draws no concern for Zidane|
|Burki looking forward to ´dream´ Madrid clash|
|Juve and Higuain have work to do - Allegri|
|CSKA boss Slutski wary of Tottenham threat|
|Pochettino: Kane to return within three weeks|
|City youngster Diaz signs three-year deal|
|Aurier vows to ´continue working hard´ for PSG despite prison sentence|
|Tuchel expecting Ronaldo on top form|
|Ter Stegen eyes new Barcelona deal|
|Hazard: No excuse for Arsenal defeat|
|Cisse back in training with Auxerre|
|Hummels resumes training ahead of Atletico clash|
|Facing Barcelona´s MSN not a nightmare, insists Bravo|
|Thiago: Atletico defence best in the world|
|Alonso wants to end career at Bayern Munich|
|Ranieri went to Slimani for Porto advice|
|Draxler: Wolfsburg blocked my exit|
|Samoura defends abolishment of racism task force|
|Sampaoli backs Nasri for France recall|
|Gisdol ´twitching with joy´ at Hamburg presentation|
|Zanetti determined Inter will return to the top|
|Getafe sack Esnaider|
|Bartra happy with playing time at Dortmund|
|Aurier handed two-month prison sentence over police altercation|
|Klopp attributes Lallana´s fine form to hard work|
|Totti´s wife slams ´small man´ Spalletti|
|Guardiola has already done an amazing job at Manchester City - Alonso|
|Referees attacked by hooligans in Bosnia and Herzegovina|
|Griezmann: I am not the anti-Benzema|
|Sterling hails Guardiola´s role in goalscoring form|
|Champions League Matchday Two: Madrid look for first win in Dortmund|
|Smalling confident Rooney will bounce back|
|Vardy fears ´permanent stain against my name´ following casino incident|
|Brave Wilshere will reap rewards of loan move - Howe|
|MLS Review: Sounders surprise Galaxy, Kamara double sinks New England|
|Walcott a special case - Wenger|
|Guardiola striving for more after perfect 10|
|Chelsea risk another mid-table finish, admits Conte|
|Montella feels AC Milan lacked courage|
|Robben speaks out on injury fears|
|Fiorentina 0 AC Milan 0: Ilicic misses penalty on Montella´s return|
|Gisdol replaces Labbadia at Hamburg|
|Ibrahimovic threatened me over Pogba deal - Raiola|
|Balotelli could make Nice return against Krasnodar|
|Southampton deserved to win – Bilic|
|Podolski takes aim at Mourinho over Schweinsteiger treatment|
|Atletico midfielder Augusto suffers ACL injury|
|Sagna: More to Aguero than goals|
|Errors are urgent matter for Schalke - Weinzierl|
|Puel delighted with sublime Southampton second half|
|Simeone praises ´decisive´ Gameiro|
|Noble: West Ham can´t get any worse|
|Pjanic: I will play wherever Allegri needs me|
|West Ham 0 Southampton 3: Defensive woes pile pressure on Bilic|
|Kondogbia makes the same mistakes often – De Boer|
|Gray backed by Dyche after ban for abusive social media posts|
|Gabriel needs time to get used to Serie A - Ausilio|
|Atletico Madrid´s Gimenez and Augusto doubts for Bayern Munich clash|
|Atletico Madrid 1 Deportivo La Coruna 0: Griezmann downs 10-man Depor|
|Angry Spalletti slams Roma players´ attitude|
|Liverpool have unbelievable quality - Milner|
|Simeone´s son Giovanni scores first Serie A goal|
|Ivanovic: Chelsea let Conte down|
|Inter 1 Bologna 1: Battling Bologna end Inter streak|
|Guardiola: Top-four finish very tough for Man City|
|Rodgers expecting tough test against City and Aguero|
|Zamparini admits Balotelli interested Palermo|
|Former Swansea, Arsenal great Mel Charles dies|
|Asamoah, Rugani ruled out for up to seven weeks|
|Totti reaches 250 Serie A goals in Roma defeat|
|Alves makes LaLiga history as Valencia see off Leganes|
|Guardiola rues De Bruyne injury as Man City await scan|
|Las Palmas draw could prove costly, admits Morata|
|Gabriel explains choosing Inter over Juventus|
|Hamburg dismiss Labbadia|
|West Ham players expect Payet´s free-kick magic - Antonio|
|Man City must tell Guardiola to stop, says Toure´s agent|
|Hamsik thrilled to reach 100 Napoli goals|
|Zabaleta warns Man City over Celtic backlash|
|MLS Review: Red Bulls, Toronto into play-offs|
|´We were unlucky´ - Bale|
|Guardiola keen for Spurs test|
|Rodgers: I never fell out with Sterling|
|Wenger hails ´different´ Walcott|
|Mazzarri backs Deeney for England call-up|
|Mamelodi Sundowns and Zamalek reach CAF Champions League final|