Toyota will start tomorrow's Nurburgring round of the World Endurance Championship from pole position, following a close-knit qualifying session.
Jose Maria Lopez and Kamui Kobayashi set the fastest average time during the 15-minute run, pipping the best-placed Porsche 919 Hybrid by 0.154 seconds.
After holding the top-spot during the early stages, Brendon Hartley and Timo Bernhard settled for second with both Porsche drivers lapping a fraction slower than the pole-sitters.
Despite setting the fastest outright lap through Andre Lotterer, the #1 Porsche finished third with a slower average.
Lotterer's time of 1:37.886s was complemented by a 1:38.671 from team-mate Neel Jani, which slotted the duo ahead of the #8 Toyota.
The result marked Toyota's third pole position of 2017, and the first with both manufacturers pitting their high-downforce aero configurations against each other.
In LMP2, G-Drive Racing continued its 100% pole position streak as Ben Hanley and Pierre Thiriet commanded the class in the #26 ORECA-Gibson.
On his first start in the TDS-entered, G-Drive branded car, Hanley reeled off a low 1m 43 before silver-rated Thiriet backed that up with a mid-1m 45 effort.
Although Thiriet's attempt was two tenths slower than Oliver Jarvis in the #38 Jackie Chan DC Racing ORECA, Hanley's run was over half a second better than Thomas Laurent, who started the Jota Sport-run car.
Row two of the LMP2 grid will be occupied by the pair of Vaillante Rebellion ORECAs, while the #35 Signatech Alpine completes the top five.
The G-Drive Racing crew will be required to take a three-minute stop and hold penalty during Sunday's race, as reparation for an incident caused by Roman Rusinov at the 24 Hours of Le Mans.
Porsche took its first WEC pole with the new 911 RSR as Kevin Estre and Michael Christensen paced the GTE-Pro field.
After securing the car's first global pole at last week's IMSA round in Canada, Porsche got off the mark in the GT world championship with a comprehensive performance at the 3.2 mile circuit.
Christensen's early 1:53.779 marker stood as the best time afternoon, while Estre's 1:54.235 was enough to put the #92 car on top by three tenths of a second from the #95 Aston Martin Vantage piloted by Nicki Thiim and Marco Sorensen.
Third was the sister Porsche driven by Frederic Makowiecki and Richard Lietz, ahead of the best Ford GT of Stefan Mucke and Olivier Pla.
GTE-Am pole went to the #98 Aston Martin driven by Paul Dalla Lana and Pedro Lamy.
Several cars had incidents in both the GT and Prototype sessions, with Dominik Kraihamer (ByKolles LMP1) and Julien Canal (Rebellion LMP2) suffering spins.
In GT, the Spirit of Race Ferrari dropped to the foot of the order after Thomas Flohr rotated into the gravel at turn one.
With qualifying complete, attention turns to the 6 Hours of the Nurburgring itself, with the race set to begin at 13:00 local time (CEST).