Milan secured qualification for the Champions League next season with a 1-0 victory over host Juventus, courtesy of a goal from Olivier Giroud, concluding its Serie A campaign in the top four on Sunday.
Coach Massimiliano Allegri made changes to his usual starting lineup in the absence of the team's leading scorer Dusan Vlahovic due to injury.
Angel Di Maria came close to giving the hosts the lead in the middle of the first half when he received a pass from Moise Kean near the penalty spot, but he failed to accurately shoot on goal.
Milan took the lead five minutes before halftime with a header from Giroud inside the penalty area. In stoppage time, Danilo almost equalized, but his close-range shot was cleared off the line by defender Pierre Kalulu.
Exhausted Juventus failed to equalize at home amid boos from their fans.
Milan, in fourth place, has 67 points, six points ahead of sixth-placed Atalanta before the final round, while Juventus is in seventh place with 59 points.
Milan will join rival Inter and Lazio in the Champions League after finishing below champion Napoli. There is still a chance for a fifth Italian team to participate in the tournament next season if Roma defeats Sevilla in the Europa League final on Wednesday.
Milan coach Stefano Pioli expressed his relief after securing qualification for Europe’s elite competition. He told DAZN that "the Champions League has given us more than we expected this season, and we felt sad to exit in the semifinals against Inter, but our journey lasted longer than anyone anticipated."
He added: "At the same time, we did not meet expectations in Serie A, but we qualified for the Champions League for the third consecutive season. I don’t know how many years have passed without this happening."
Juventus, which had ten points deducted last Monday by an Italian football court due to player transfer violations, started the match aggressively, knowing that only a victory would keep their faint hopes alive for a top-four finish.