Timo Glock scored his second pole position of the 2017 DTM season as he beat fellow BMW driver Maxime Martin to the top spot in qualifying at Hockenheim by 0.037s.
Glock jumped into first place in the final minute of the session, demoting previous leader Jamie Green with a best time of 1m30.648s.
Green occupied first place during the mid-session break and looked set to add a third consecutive pole position to his tally for this year after he was quickest in both qualifying sessions at the previous round at the Red Bull Ring.
But the Briton was unable to improve in the late stages of the session and dropped down the order behind the BMW duo of Glock and Martin.
Green is also under investigation for blocking during qualifying, as is his Audi stablemate Mike Rockenfeller.
Rast was the second-fastest Audi in fourth place, and the third row of the race one grid will be filled by Mercedes duo Edoardo Mortara and Robert Wickens.
Rockenfeller qualified seventh, ahead of the only remaining BMW title contender Marco Wittmann.
The top 10 was rounded out by two more Audi drivers - Nico Muller and championship favourite Mattias Ekstrom.
Meanwhile, Lucas Auer, the top Mercedes man in the standings, could only take 15th.
|13||Paul Di Resta||Mercedes||0.378s||11|