Mugello - Danilo Petrucci, an Italian riding for local team Ducati, held off Marc Marquez to gain a first ever MotoGP victory on Sunday in the Italian Grand Prix.
The second place allowed Spaniard Marquez to increase his lead in the world championship ahead of another Italian on a Ducati, Andrea Dovizioso, who finished third on Sunday after a prolonged three-way battle.
Five-time MotoGP champion Marquez on a Honda briefly took the lead in the last lap but Petrucci recaptured first place and won.
"It's amazing, I'm thrilled," said 28-year-old Petrucci, who finished eighth in the 2017 and 2018 world championships.
"On front of my home crowd and in my town, it's incredible, I can't describe how I feel."
Marquez - winner of three out of six races this season - started on pole but had to battle with the Ducati riders and Suzuki's Alex Rins, who challenged hard despite starting back on the grid.
The four riders overtook each other several times but Petrucci found the power to pull clear on the final lap of the fast Mugello circuit.
Italian star Valentino Rossi crashed out of his home race where the Yamaha rider has not won since 2008 after an impressive series of seven consecutive victories.
Marquez, who has won the MotoGP category just once on the circuit north of Florence, leads Dovizioso by 12 points after six rounds this season.
Earlier Marquez's younger brother Alex won the Moto2 category having also won at Le Mans last time out.
Alex Marquez led a Kalex sweep ahead of team-mates Italian Luca Marini, Rossi's half-brother, and Swiss Thomas Luthi.
The Spaniard pulled clear of his rivals on lap 14 of 21 to finish 1.928 ahead of Marini with Luthi at 2.242.
For Marquez, 23, it was his fifth victory since he began racing in the category since 2015.
Italian Luca Baldassari holds the overall world championship lead after finishing fourth, but is just two points ahead of Marquez.
Italian teenager Tony Arbolino stormed to a maiden career victory as the Honda rider won the Moto3.
Arbolino, 18, pipped Italian team-mate Lorenzo Dalla Porta, who finished 0.029 behind, with Spanish KTM rider Jaume Masia third at 0.078.
Spaniard Aron Canet of KTM finished seventh to hold the overall world championship lead ahead of Dalla Porta.
Results and overall standings from the Italian motorcycling Grand Prix in Mugello on Sunday:
MotoGP
1. Danilo Petrucci (ITA/Ducati) 23 laps in 41 min 33sec, 2. Marc Marquez (ESP/Honda) at 0.043sec, 3. Andrea Dovizioso (ITA/Ducati) 0.338, 4. Alex Rins (ESP/Suzuki) 0.535, 5. Takaaki Nagakami (Honda-LCR) 6.535, 6. Maverick Vinales (ESP/Yamaha) 7.481, 7. Michele Pirro (ITA/Ducati) 13.288, 8. Cal Crutchlow (GBR/Honda-LCR) 13.937, 9. Pol Espargaro (ESP/KTM) 16.533, 10. Fabio Quartararo (FRA/Yamaha-SRT) 17.994
Best lap: Jack Miller (AUS/Ducati-Pramac) 1:47.657
Track record: Marc Marquez (1:45.519 in 2019 qualifying)
Overall standings
1. Marc Marquez (ESP/Honda) 115pts, 2. Andrea Dovizioso (ITA/Ducati) 103, 3. Alex Rins (ESP/Suzuki) 88, 4. Danilo Petrucci (ITA/Ducati) 82, 5. Valentino Rossi (ITA/Yamaha) 72
Moto2
1. Alex Marquez (ESP/Kalex) 21 laps in 39min 31sec, 2. Luca Marini (ITA/Kalex) at 1.928sec, 3. Thomas Lüthi (SUI/Kalex) 2.242, 4. Lorenzo Baldassari (ITA/Kalex) 3.653, 5. Augusto Fernandez (ESP/Kalex) 3.973
Overall standings
1. Lorenzo Baldassarri (ITA/Kalex) 88pts, 2. Alex Marquez (ESP/Kalex) 86, 3. Thomas Luethi (SUI/Kalex) 84, 4. Jorge Navarro (ESP/SpeedUp) 73, 5. Marcel Schroetter (GER/Kalex) 64
Moto3
1. Tony Arbolino (ITA/Honda) 20 laps in 3 min 29sec, 2. Lorenzo Dalla Porta (ITA/Honda) at 0.029sec, 3. Jaume Masia (ESP/KTM) at 0.078, 4. Niccolo Antonelli (ITA/Honda) 0.156, 5. Dennis Foggia (ITA/KTM) 0.267
Overall standings
1. Aron Canet (ESP/KTM) 83pts, 2. Lorenzo Dalla Porta (ITA/Honda) 80, 3. Niccolo Antonelli (ITA/Honda) 70, 4. Jaume Masia (ESP/KTM) 65, 5. Celestino Vietti (ITA/KTM) 52