Udinese clinch Champions League place
Serie A's top scorer Antonio Di Natale made sure the Bianconeri had to sweat until the last after missing a penalty with 15 minutes to go but in a game of few chances the point was all Udinese needed to finish above Lazio.
Lazio, who won 4-2 in Lecce, finished level with Udinese on 66 points, four behind Napoli with Milan ending up six clear of Inter.
Udinese will now play in the qualifying round of Europe's top competition for only the second time following their first foray into the Champions League in 2005.
"It's a magical evening," Udinese coach Francesco Guidolin told Italian television RAI after prolonged celebrations on the pitch.
"There was a fantastic atmosphere with a full stadium tonight and we have to enjoy the moment. We'll think about the qualifying round of the Champions League later but finishing fourth for a club like Udinese is an extraordinary achievement."
Roma joined fifth-placed Lazio and Coppa Italia finalists Palermo in the Europa League.
Despite needing just a draw to finish fourth, Francesco Guidolin's attractive side began cautiously against a full strength Milan side determined to shackle the threat of flying winger Alexis Sanchez and Di Natale.
Looking for his 29th goal of the campaign, Di Natale struck the outside of the post with a 30-yard free-kick after Kevin-Prince Boateng had become the third Rossoneri within the first 20 minutes to be booked.
As the home side pressed for the crucial goal, strike partner Sanchez headed over on 35 minutes after a fine run and cross from left-back Pablo Armero.
But as the tension began to rise with news of Lazio winning, the champions dominated possession and created chances of their own.
Boateng volleyed inches over after a cross from Antonio Cassano before the former Sampdoria forward shot a yard wide after a neat turn just outside the box five minutes before the break.
Milan continued to pose the greater threat early in the second half but with more Lazio goals being scored in Lecce, Udinese upped the tempo, creating four outstanding chances in as many minutes.
After Sanchez was brought down by Clarence Seedorf's lunge in the box, Di Natale could only hold his head in his hands as Marco Amelia turned his penalty on to the post.
Swiss midfielder Gokhan Inler had a header saved by Amelia before watching in agony as his swerving 30-yarder crashed back off the bar with Amelia beaten.
A minute later, Sanchez wriggled into the box again but this time it was Amelia's feet that came to Milan's rescue.
Udinese were not to pay for the misses, though, as the Rossoneri showed far less ambition towards the end, allowing the Friuli to celebrate with wild abandon at the final whistle.
In Lecce, Lazio, who had crucially lost 2-1 at Udinese two weeks ago, were twice ahead in the first half before being pegged back by a Lecce side that had guaranteed Serie A su