Volkswagen has officially fired former Audi chief executive Rupert Stadler.

The supervisory boards of the VW Group and Audi revealed in a statement that their contracts with Stadler had been terminated due to his ongoing pre-trial detention and because “he is unable to fulfill his duties as a member of the board of management.” The automaker say that Stadler agreed to have his contracts terminated.

Stadler has been locked up since mid-June shortly after his apartment was raided by Munich prosecutors. Although no formal charges have been made against him, Stadler remains in detention as prosecutors believe he could obstruct ongoing investigations into VW’s diesel emissions scandal.

After his arrest, Audi and VW said that Stadler must still be presumed to be innocent until proven guilty. He is the most senior executive from the Volkswagen Group to be arrested in relation to the diesel scandal.

Speaking with the Financial Times in the summer, senior Volkswagen executive and supervisory board member of Audi, Hiltruyd Werner, suggested coming to a decision about Stadler’s future with the company was proving difficult.

“Do you do something for the optics or do you do something for justice or for the truth? That’s the tricky bit. To what do you give preference — the good headline and the optics, or fairness and justice?” he asked.

An internal investigation by the Volkswagen Group concluded in 2016 that Stadler had no prior knowledge of dieselgate. This conclusion came despite reports that Stadler knew of the diesel cheating as early as 2007 when he became chairman.