MUNICH (Reuters) - Former Wirecard CEO Markus Braun, on trial for one of Germany's biggest corporate scandals, has lost his main lawyer after the insurance funds to cover his mounting legal costs ran dry, a court document and statements from the lawyer showed on Wednesday.

Braun had been represented by attorney Alfred Dierlamm to defend himself against charges of fraud and falsifying accounts in a trial in a Munich court that began in 2022. He denies all charges.

Dierlamm's exit means Braun will now be represented by state-funded lawyers to prove his innocence after the spectacular collapse of the online payments company in 2020 that shook Germany's business and political establishment.

Wirecard filed for insolvency in 2020, owing creditors almost $4 billion, after disclosing a 1.9 billion euro ($2.06 billion) hole in its accounts that auditor EY said was the result of sophisticated global fraud.

Dierlamm resigned after the insurance money to cover legal fees was used up.

"The pot is empty," he told Reuters.

Dierlamm is considered one of Germany's most prominent defence lawyers having participated in numerous commercial proceedings including the VW diesel emissions scandal.

($1 = 0.9207 euros)

(Reporting by Jörn Poltz; writing by Matthias Williams; editing by Jason Neely)