Tom Blomqvist beat DTM title contender Rene Rast to pole position at Hockenheim, as the final qualifying session of the 2017 season was disrupted by a drain cover incident.
Blomqvist sat third behind BMW stablemate Marco Wittmann and Audi driver Rast at the halfway point, but jumped ahead of both in the final minutes.
Outgoing champion Wittmann had gone quickest with his first effort and posted the best lap of the weekend - a 1m30.564s - next time by.
He sat 0.030s clear of Rast at the conclusion of the opening runs, when the session was red-flagged.
A drain cover in the braking zone on the main straight was loosened by Gary Paffett and then collected by fellow Mercedes driver Paul di Resta, the Scotsman sustaining a left-front puncture as a result.
This led to the 20-minute session being suspended, allowing track workers to head out and attempt repairs - as the missing drain cover had now left a sizable hole in the ground.
Qualifying resumed over half an hour later, and while neither Wittmann nor Rast improved on their first flying laps, Blomqvist leapfrogged both with a 1m30.491s effort.
Rast, however, had one more lap in him, splitting the BMW pair at the chequered flag to secure a crucial front row start.
Wittmann had to do with third, with Mercedes' lead driver Lucas Auer staying put in fourth place.
Saturday race winner Jamie Green qualified fifth, just 0.099s off pole, but will drop down the order due to a 10-place grid penalty given for a fifth warning of the season.
Therefore Mercedes driver Robert Wickens and BMW's Maxime Martin will make up the third row, ahead of Audi's Mike Rockenfeller and BMW driver Augusto Farfus.
Championship leader Mattias Ekstrom qualified only 10th, 0.270s off pole, and likewise has a grid penalty hanging over him. He is to start 14th, one place ahead of Green.
Rast's two bonus points for second place in qualifying leave him 11 points behind the Swede in the standings, with the German holding an advantage on victory countback should they finish level on points.
Green remains nine points behind Ekstrom, with outside contender Rockenfeller 20 points off the championship lead.
|-||Paul Di Resta||HWA||Mercedes||-|