Substitute Gonzalo Higuain scored a late winner as champions Juventus ended Inter Milan’s perfect league start to move top of Serie A.
Higuain struck powerfully past Samir Handanovic with 10 minutes remaining to send Maurizio Sarri’s side one point above their opponents at the San Siro.
Juventus had led after just four minutes through Paulo Dybala.
But Inter levelled 14 minutes later as Lautaro Martinez converted a penalty after a handball by Matthijs de Ligt.
A highly anticipated 236th Derby d’Italia between the league’s top two sides saw former Chelsea managers Sarri and Antonio Conte go head to head for the first time since their respective summer appointments.
Conte’s Inter had won all six league games leading into game – and their previous five home Serie A fixtures – but Juventus were rewarded for their early intent as Dybala cut in from the left and curled into the opposite corner for the opener.
Inter, beaten 2-1 by Barcelona in the Champions League on Wednesday, were not behind for long as Martinez struck confidently from the spot after Nicolo Barella’s cross had struck De Ligt on the arm.
A tense second half saw action at both ends of the pitch, as Juventus goalkeeper Wojciech Szczesny denied Matias Vecino at close range and Handanovic did well to block Cristiano Ronaldo’s low strike.
But the champions, whose only blip so far was a goalless draw against Fiorentina last month, were rewarded for their persistence as Higuain latched on to Rodrigo Bentancur’s pass to secure all three points.