Juventus' Marco Borriello (unseen) celebrates with his team mates after scoring against Cagliari during their Serie A soccer match at the Nereo Rocco stadium in Trieste May 6, 2012
Diego Milito scored a hat-trick including two penalties for Inter, who hit back after falling 2-1 behind early in the second half while Zlatan Ibrahimovic claimed both Milan goals, the first a highly controversial penalty.
Mirko Vucinic set Juventus on their way in Trieste, Cagliari's adopted home for the remainder of this season, with a fifth-minute goal and Michele Canini put through his own net in the 74th minute.
There were chaotic scenes at the end as Juventus fans invaded the pitch to join the celebrations for a record 28th title, acheived in the first season under coach Antonio Conte.
The Sardinians have been forced to play their home games in Trieste, 800 kilometres from Cagliari on the Italian mainland because of safety problems at the intimidating Stadio Sant'Elia.
Juventus, still unbeaten after 37 matches, have 81 points, four clear of Milan, the defending champions.
They last won Serie A in 2003, having been stripped of the 2005 and 2006 titles over the Calciopoli match-fixing scandal.
"It's extraordinary, fantastic," Conte told reporters after winning the title in his first season in charge.
Milan coach Massimiliano Allegri was gracious in defeat.
"Juventus deserved to win the title, we'll try again next year," he said.
Juventus got off to a dream start when Vucinic sprang the Cagliari offside trap to run onto Leonardo Bonucci's pass and scored with an angled shot after five minutes.
Canini's misfortune, when he inadvertently turned the ball into his own net in attempting to get to Martin Caceres' cross before Marco Boriello, meant that all eyes were on San Siro where Milan had to win to stay in the hunt.
They made a dreadful start as their defence froze at a free kick, allowing Walter Samuel to ghost in and knock the ball into the path of Milito who scored from close range in the 14th minute.
Inter had claims for a second goal when Esteban Cambiasso's effort was scrambled away by goalkeeper Christian Abbiati amid suspicions that the ball may have crossed the line.
Abbiati was injured in the incident and replaced by Marco Amelia but it was Inter keeper Julio Cesar who found himself in the spotlight.
The Brazilian conceded a penalty one minute before halftime when he was judged to have tripped Kevin-Prince Boateng as he dived at the Ghanaian's feet, though replays clearly showed he got his hand to the ball first.
Julio Cesar attempted to distract penalty-taker Ibrahimovic but sticking out his tongue but the Swede took no notice and calmly fired the ball into the corner.
Ibrahimovic struck again less than one minute after the restart when he collected the ball on the edge of the area following a clever Boateng dummy, got free of the Inter defence and nonchalantly chipped the ball over Julio Cesar for his 28th goal of the season.
Wesley Sneijder nearly caught Amelia with an outrageous lob before Inter equalised in the 52nd minute, Milito scoring from a penalty he won himself after being pushed in the area by Ignazio Abete
Milito put Inter ahead from another penalty, awarded for handball by Alessandro Nesta who angrily claimed it was accidental, in the 79th minute before a thunderbolt by Maicon completed the scoring.
Milan are already sure of the runners-up spot and a place in the Champions League group stage while the race for third place, which earns a spot in the final qualifying round, took another twist as Napoli slumped to a 2-0 defeat at Bologna.
Napoli, who started the weekend in third, hit the woodwork three times while Alessandro Diamanti and Matteo Rubin scored in each half for Atalanta.
Napoli's frustration boiled over in the last minute as the two teams became involved in a mass brawl and red cards were shown to Bologna's Archimede Morleo and Napoli's Blerim Dzemaili.
Udinese took full advantage, beating nine-man Genoa 2-0 to go third with 61 points, one ahead of Lazio and three clear of Napoli.
Antonio Di Natale, with his 22nd goal of the season, and Antonio Floro Flores scored in each half for Udinese against opponents who had Juraj Kucka and Rodrigo Palacio sent off before halftime.
Fabrizio Miccoli scored a hat-trick as Palermo were held 4-4 at home by Chievo in a match during which both sides squandered two-goal leads.
Marco Rigoni scored a hat-trick, including two penalties, to give Novara a 3-0 win over Cesena in a meeting of two teams who have already been relegated.