AC Milan wrapped up a Europa League group stage place as Gennaro Gattuso's first season in charge ended with 5-1 thumping of Fiorentina at San Siro.

Already sure of a qualifying spot, the Rossoneri needed to at least match Atalanta's result against Cagliari in order to finish sixth in Serie A and go directly through to the main draw of Europe's second-tier continental competition.

And Milan made sure in style thanks in large part to Hakan Calhanoglu, who equalised three minutes after Giovanni Simeone's opener and then delivered the cross for Patrick Cutrone to head the hosts into the lead at the end of an eventful first half.

Nikola Kalinic added a third against his former side soon after the restart before Cutrone and Giacomo Bonaventura combined to cap off a positive last assignment for Gattuso, who will now have more time to prepare for his first full season at the helm having taken charge in November.

He will surely hope to include Gianluigi Donnarumma in those plans, with the young goalkeeper continually linked with a move away after the most difficult campaign of his short career.

Whatever the outcome, Gattuso can take some satisfaction in steering Milan into Europe.

Franck Kessie threatened to open the scoring for the second week in succession when he broke into the box in the seventh minute, but Marco Sportiello spread himself well to make the save and Cutrone turned wide on the follow-up.

Kalinic was similarly wasteful four minutes later as he shot straight at Sportiello from 20 yards and the hosts were soon made to pay for their profligacy.

Federico Chiesa threaded a pass in behind Ricardo Rodriguez that was reeled in by Simeone, who delicately dinked over the onrushing Donnarumma.

However, the lead lasted just three minutes. Calhanoglu, who scored the equaliser when these teams drew 1-1 in December, was again the man to rescue Milan, driving a low free-kick past the wall that appeared to surprise Sportiello.

Kessie's heavy touch next squandered what should have been a one-on-one, but Fiorentina's luck ran out when, four minutes from the interval, Cutrone expertly headed in Calhanoglu's cross from the right edge of the area.

Stefano Pioli had lost Vitor Hugo to injury in just the 29th minute and emptied his bench at the break, withdrawing captain German Pezzella and goalkeeper Sportiello, the latter having picked up a head knock during the first half.

And his plans were truly in pieces in the 49th minute, substitute Bartlomiej Dragowski powerless to prevent Kalinic from poking home at point-blank range after saving Cutrone's initial downward header.

Milan were oozing confidence by that stage and stretched their advantage 10 minutes later with Italy international Cutrone tucking Calhanoglu's pass through Dragowski's legs.

There was still time for Bonaventura to get in on the fun with 14 minutes to play, the midfielder driving toward goal and firing through Fiorentina's stand-in shot-stopper to put the seal on Milan's end to the season.