A pair of Franck Kessie penalities at the end of either half ensured AC Milan finished the season second — 12 points behind city rivals Inter Milan — and return to the Champions League for the first time since the 2013-2014 season.
“We deserved the Champions League as well as second place,” said Milan coach Stefano Pioli whose side had missed the chance to seal their berth last weekend against Cagliari.
“We went through the whole championship at the top, unfortunately we had thrown away the match point last Sunday.
“I’m really excited, happy, I have to thank the club because they made us work in a spectacular way.”
Atalanta had already ensured a third consecutive season of Champions League football but missed out on a first second-place Serie A finish days after losing out in the Coppa Italia final to Juventus.
Cristiano Ronaldo was left on the bench by Juventus coach Andrea Pirlo who opted for an attacking line-up of Paulo Dybala and Alvaro Morata flanked by Federico Chiesa and Dejan Kulusevski.
“It was a shared choice, Ronaldo was tired after the fatigue on Wednesday,” said Pirlo.
“He made himself available to the team but I chose to have another player named Morata play, who is not the latest arrival. I have a quality team, with many choices available.”
A Morata brace along with goals from Chiesa and Adrien Rabiot prevented Juventus missing out on the elite European competition for the first time since 2012.
In Naples, Amir Rrahmani scored for Napoli after an hour against his former club, which would have been enough to secure a berth at the top table but Davide Faraoni pulled one back for the visitors nine minutes.
Gennaro Gattuso’s side were denied a return to elite European action after also missing out last season.