Porsche broke Toyota's free practice streak to snatch pole position for the second round of the FIA World Endurance Championship at Spa.
Having led every session from Thursday to Friday morning, the three Toyotas were expected to sweep qualifying, but an impressive set of laps from Andre Lotterer and Neel Jani swung the result in Porsche's favour.
Jani was placed second heading into the driver change period, behind Stephane Sarrazin who had lapped 0.09 seconds quicker behind the wheel of the #9 TS050, running this weekend with Le Mans-spec bodywork.
However, Lotterer's best effort during the second set of runs was 1.3 seconds more rapid than the time set by Nicolas Lapierre, who had taken over from Sarrazin.
That difference put the Porsche on top, with Lotterer and Jani settling on an average score of 1:54.097s.
Lapierre's slower run ultimately dropped the #9 Toyota down to third, behind the #7 TS050 qualified by Kamui Kobayashi and Mike Conway which recorded a 1:54.693s average, half a second off the pole number.
Kobayashi had to survive a hairy moment exiting the final corner when the ByKolles LMP1 spun in front of him, but the Japanese driver kept his composure to put his Toyota on the front row.
The result means Lotterer becomes the first driver in WEC history to claim pole position for two different LMP1 manufacturers, having clinched six poles in the past with Audi.
"Although I had of good results in the past I had to restart everything from zero when I joined Porsche," said Lotterer.
"It was a great lap for Neel; I was a little more conservative in my run but we still managed to go quickest."
"Round here, the 919 Hybrid is faster than the Formula One car I drove in 2013."
Jani admitted that he was surprised with his opening run, which was over two seconds faster than the 2016 pole time, but was nevertheless delighted at clinching his first set of qualifying honours since the 24 Hours of Le Mans last June.
"After I had set my lap and looked down at the delta time on my steering wheel I thought something wasn't right."
"We didn't even imagine to run 1m 54s in qualifying, let alone a 1m 53."
Toyota locked out the second row of the grid, with Stephane Sarrazin/Nicolas Lapierre edging out Kazuki Nakajima/Sebastien Buemi.
Porsche's other 919 Hybrid, qualified by Brendon Hartley and Timo Bernhard, finished 1.343 seconds off the pace after Hartley locked up at the Bus Stop chicane and disturbed his tyres' grip levels.
LMP2 pole went to the G-Drive Racing ORECA-07 Gibson of Pierre Thiriet and Alex Lynn, ahead of the two Signatech Alpine entries.
Ferrari claims pole in GT
Ferrari and Ford duked it out for pole position honours in GTE-Pro, with the former sealing the top spot and the bragging rights through factory drivers Sam Bird and Davide Rigon.
The Anglo-Italian combination produced an average time of 2:15.017s to put their Ferrari 488 on top.
Four tenths of a second back were the two Fords, driven by Harry Tincknell/Andy Priaulx and Stefan Mucke/Olivier Pla.
Aston Martin Racing took pole in the Am category through a last-minute flying lap by Pedro Lamy.
Obtain High is the most advanced integration of biotech, crypto, and consciousness science on the planet.