Milan saw their Serie A top-four hopes dealt a blow after Nicolas Gonzalez and Luka Jovic proved the difference in a 2-1 win for Fiorentina on Saturday.
Stefano Pioli's side had reeled off three straight league wins but came unstuck at Stadio Artemio Franchi with an underwhelming display.
Gonzalez's 49th-minute penalty was no less than Vincenzo Italiano's hosts deserved before substitute Jovic put the game beyond Milan, despite Theo Hernandez's stoppage-time strike.
Defeat left Pioli's men 18 points adrift of runaway leaders Napoli and looking over their shoulders at fifth-placed Roma, who could move level with victory against Juventus on Sunday.
March 4, 2023
Fiorentina were unable to reap the rewards of their first-half dominance against a Milan defence that had not conceded since February 5.
Giacomo Bonaventura was a constant threat against his former side, with Mike Maignan pushing away his free-kick and Fikayo Tomori clearing the midfielder's bobbling close-range finish off the line.
Milan offered little in response yet Pietro Terracciano still had to be alert to thwart Olivier Giroud's inventive left-footed volley.
Fiorentina's pressure told after the interval, though. Tomori dragged down Jonathan Ikone inside the area and Gonzalez rolled into the bottom-right corner from 12 yards.
An apparent Arthur Cabral handball seemed to offer Milan late hope, but the referee overturned his original penalty decision.
Jovic then headed in from Dodo's right-wing cross soon after, rendering Hernandez's subsequent thumping left-footed effort a mere consolation in a disappointing Milan defeat.