Yamaha's Maverick Vinales took pole position on Saturday ahead of team-mate Valentino Rossi for the Italian MotoGP at the Mugello Circuit.
Championship leader Vinales was 0.239s ahead of Rossi while Ducati's Andrea Dovizioso completed the front 0.260s further back, third quickest.
Home favourite Rossi – who is still nursing chest and stomach injuries from a recent accident – has not won in Italy since 2008, which was his seventh Mugello victory in a row. He was just 14th fastest on Friday but totally turned his form around on Saturday.
Here's the front row for Sunday's #ItalianGP
— FOX Sports LIVE! (@FSAsiaLive) June 3, 2017
Dovizioso's teammate Michele Pirro was fourth, with Repsol Honda duo Dani Pedrosa and reigning world champion Marc Marquez next.
Marquez found himself stuck behind Johann Zarco on his final lap and was not able to improve his best time.
In seventh spot, 0.577s back, was Jorge Lorenzo of Ducati followed by Aspar's Alvaro Bautista and Octo Pramac’s Petrucci. Marc VDS rider Tito Rabat was tenth fastest.
Petrucci had actually set a much faster lap and found himself in the conversation for the front row before being stripped of his best lap time due to exceeding track limits.
Vinales will start Sunday's race with a 17-point lead over Pedrosa, 23-point lead over Rossi and 27-points ahead of Marquez in the MotoGP rider standings.
1. Maverick Viñales ESP Movistar Yamaha MotoGP (YZR-M1) 1m 46.575s
2. Valentino Rossi ITA Movistar Yamaha MotoGP (YZR-M1) +0.239s
3. Andrea Dovizioso ITA Ducati Team (Desmosedici GP17) 0.260s
4. Michele Pirro ITA Ducati Team (Desmosedici GP17) 0.303s
5. Dani Pedrosa ESP Repsol Honda Team (RC213V) 0.424s
6. Marc Marquez ESP Repsol Honda Team (RC213V) 0.475s
7. Jorge Lorenzo ESP Ducati Team (Desmosedici GP17) 0.577s
8. Alvaro Bautista ESP Pull&Bear Aspar Team (Desmosedici GP16) 0.592s
9. Danilo Petrucci ITA Octo Pramac Racing (Desmosedici GP17) 0.691s
10. Tito Rabat ESP Estrella Galicia 0,0 Marc VDS (RC213V) 0.707s
11. Johann Zarco FRA Monster Yamaha Tech 3 (YZR-M1) 0.744s
12. Aleix Espargaro ESP Factory Aprilia Gresini (RS-GP) 0.900s
13. Cal Crutchlow GBR LCR Honda (RC213V) 1m 47.220s
14. Hector Barbera ESP Reale Avintia Racing (Desmosedici GP16) 1m 47.272s
15. Jonas Folger GER Monster Yamaha Tech 3 (YZR-M1)* 1m 47.305s
16. Andrea Iannone ITA Team Suzuki Ecstar (GSX-RR) 1m 47.625s
17. Loris Baz FRA Reale Avintia Racing (Desmosedici GP15) 1m 47.809s
18. Pol Espargaro ESP Red Bull KTM Factory Racing (RC16) 1m 47.940s
19. Jack Miller AUS Estrella Galicia 0,0 Marc VDS (RC213V) 1m 47.961s
20. Scott Redding GBR Octo Pramac Racing (Desmosedici GP16) 1m 47.975s
21. Karel Abraham CZE Pull&Bear Aspar Team (Desmosedici GP15) 1m 48.361s
22. Sam Lowes GBR Factory Aprilia Gresini (RS-GP)* 1m 48.416s
23. Bradley Smith GBR Red Bull KTM Factory Racing (RC16) 1m 48.594s
24. Sylvain Guintoli FRA Team Suzuki Ecstar (GSX-RR) 1m 48.892s