Timo Glock has completed BMW's DTM line-up for the 2013 season.
Following his outing, Glock has now signed a deal to become the eighth and final driver for BMW.
BMW motorsport director Jens Marquardt said: "Over the course of his career, Timo has proven on more than one occasion how valuable he is to any team, thanks to his driving ability and open manner.
"The fact that he is now returning to the BMW family six years after leaving his role as test driver for the BMW Sauber F1 team makes this appointment all the more pleasing.
"I am confident Timo will take no time at all to find his feet in the DTM and will give the fans a lot of pleasure."
Feature: Why F1 stars fail in the DTM
It has not been announced which of BMW's four teams Glock will drive for.
The Schnitzer, RBM and RMG squads are being joined by Munich-based EMTEK for 2013.
"It is very exciting for me to drive for BMW again after all these years - and in such a top-class racing series as the DTM," said Glock.
"I had a fantastic time in Formula 1, but am now looking forward to battling for victories again with my old friends at BMW Motorsport. That is the approach I shall be taking to the challenge of the DTM.
"I am obviously aware I will have to adapt to a few areas.
"Not all former Formula 1 drivers have found their feet immediately in the DTM. But I am using precisely that as my motivation."
BMW confirmed its other seven drivers last December, while Maxime Martin was appointed DTM reserve driver earlier this month.