Pramac Ducati rider Jack Miller took a shock maiden MotoGP pole position in a wet-dry qualifying session in Argentina after he gambled by switching to slicks late-on.
Honda's Dani Pedrosa qualified second, with Johann Zarco third at the drying Termas de Rio Hondo track.
Marc Marquez will start sixth and Jorge Lorenzo could only qualify 14th for Ducati after failing to make it through from Q1.
Rain began falling in FP4 and although a dry line began to emerge early on in qualifying, wet tyres were used in Q1 and at the beginning of Q2.
But Miller, Marquez and Cal Crutchlow started their second runs on slick tyres, and were the only three riders to throw the dice and changed to the dry-weather rubber.
But while Marquez and Crutchlow quickly returned to the pits to revert to wets after one lap, Miller stayed out and grabbed pole with a last-second flyer, beating Pedrosa by 0.177-seconds with a time of 1m47.153s.
The front row for Sunday's race will be completed by Tech3 Yamaha's Zarco, who was just 0.035s slower than Pedrosa.
Avintia Ducati rider Tito Rabat - on a GP17 bike, as was Miller - took an impressive fourth, with Suzuki's Alex Rins ending up fifth.
Marquez had been the clear favourite for a fifth straight Argentina pole coming into qualifying after topping third and fourth practice, but in the end he had to settle for sixth, 0.601s off the pace.
Aprilia's Aleix Espargaro was at the top of the timesheets after the first runs, but he dropped down to seventh by the finish.
Qatar winner Andrea Dovizioso was more than a second off the pace in eighth for Ducati.
The factory Yamahas of Maverick Vinales and Valentino Rossi were only ninth and 11th respectively, sandwiching Crutchlow, as Suzuki's Andrea Iannone rounded out the Q2 order.
In Q1, although the factory Ducatis of Dovizioso and Jorge Lorenzo spent most of the session in the top two positions, a last-second improvement from Espargaro sent him through to the second segment of qualifying.
The Aprilia rider's 1m49.128s effort put him in the clear by 0m390s, with Dovizioso joining him in advancing to Q2.
Lorenzo was also beaten by Karel Abraham's (Angel Nieto) on a two-year-old Ducati and will start the race from 14th.
Scott Redding was more than a second slower than his Aprilia team-mate, giving him 15th on the grid, with Pol Espargaro leading KTM's efforts one place further back.
Avintia Ducati's Xavier Simeon, also a on two-year-old bike, was the top rookie in 17th. The third GP18 rider Danilo Petrucci (Pramac) - usually wet-weather specialist - qualified 18th.
|1||Jack Miller||Pramac Ducati||Ducati||1m47.153s|
|3||Johann Zarco||Tech3 Yamaha||Yamaha||0.212s|
|4||Tito Rabat||Avintia Ducati||Ducati||0.528s|
|10||Cal Crutchlow||LCR Honda||Honda||2.151s|
|13||Karel Abraham||Aspar Ducati||Ducati||2.725s|
|17||Xavier Simeon||Avintia Ducati||Ducati||3.211s|
|18||Danilo Petrucci||Pramac Ducati||Ducati||3.296s|
|19||Alvaro Bautista||Aspar Ducati||Ducati||3.453s|
|20||Thomas Luthi||MVDS Honda||Honda||3.680s|
|22||Franco Morbidelli||MVDS Honda||Honda||3.859s|
|23||Hafizh Syahrin||Tech3 Yamaha||Yamaha||3.989s|
|24||Takaaki Nakagami||LCR Honda||Honda||4.234s|