Rene Rast took his sixth pole position of the 2019 DTM season at the Laustizring, defeating his Audi team-mate and title rival Nico Muller with a last-minute lap.
Rast had been as low as eighth and two places down on Muller after making "mistakes" during his first run, but returned to the track to set the best lap of 1m35.241s as he and Muller traded best sector times late on.
Muller crossed the line just after Rast and placed third with a 1m35.438s lap, with Audi's Jamie Green splitting the two title rivals.
Audi locked out the top four positions with Robin Frijns beating BMW's Marco Wittmann to fourth.
If Audi scores 20 points more than BMW through the Lausitzring weekend, it will seal the manufacturer's crown with two rounds to go.
Mike Rockenfeller qualified sixth having initially held provisional pole position at the end of the first run.
WRT Audi driver Pietro Fittipaldi was seventh and moments after setting his fastest lap his right-hand door came loose on the car and forced him into the pits before continuing.
Philipp Eng was eighth for BMW and stablemate Timo Glock took ninth after skating across the gravel early in the session.
Joel Eriksson completed the top 10 ahead of practice one pacesetter Loic Duval and BMW's Bruno Spengler.
Jake Dennis was the leading R-Motorsport Aston Martin driver in 13th.
Shortly after qualifying, it was confirmed by the sporting commission that the R-Motorsport squad had requested the seal on four of its HWA-built engines to be broken.
Autosport understands the Aston Martin team had taken the precaution after spotting an irregularity in its data that required further inspection.
A report from the technical delegate read: "As a result, according to the rules (Article 28.5), all four Aston Martin will not be considered for the manufacturers' championship in Saturday's race. Driver and team ranking remain unaffected."
It is the second time Aston has been ineligible to score manufacturer points after it was unable to count the tally scored by Jake Dennis finishing in sixth at Zolder.
Audi is the only manufacturer yet to break engine seals in 2019, after BMW elected to do so at Brands Hatch on reliability grounds.
R-Motorsport drivers Daniel Juncadella and Ferdinand Habsburg were both disqualified from qualifying and ordered to start Saturday's rac at the back of the grid after their teams worked on their cars under parc ferme conditions.
WRT Audi driver Jonathan Aberdein also earned the same punishment for work taking place under parc ferme conditions, having qualified 14th beforehand.
|13||Jake Dennis||R-Motorsport||Aston Martin||0.893s|
|14||Sheldon van der Linde||RBM||BMW||0.957s|
|15||Paul Di Resta||R-Motorsport||Aston Martin||1.283s|
|-||Daniel Juncadella||R-Motorsport||Aston Martin||-|
|-||Ferdinand Habsburg||R-Motorsport||Aston Martin||-|