Wirecard AG said it will relinquish control of funds at its banking unit after Germany’s financial regulator stepped in to prevent the money from being used to plug holes elsewhere at the company.

German regulator BaFin is ringfencing the banking unit after the payments provider on Thursday said it’s initiating insolvency proceedings. Wirecard Bank AG is not part of that process and BaFin has appointed a special representative for the unit, according to a statement by the company.

“In future, the release processes for all payments of the bank will be located exclusively within the bank and no longer at group level,” Wirecard said in a statement.

Wirecard’s insolvency filing marks the culmination of a stunning accounting scandal that led to the arrest of its former chief executive officer and left the firm unable to find over US$2 billion missing from its balance sheet.

BaFin, along with auditors and other institutions, has come under intense criticism for its role in failing to prevent one of the biggest scandals at a major German company.

The regulator must now decide if Wirecard Bank is in financial difficulty. If so, it can freeze deposit withdrawals to win time and assess the bank’s viability. If it has no future, BaFin has to decide whether the bank should be wound down or sent into insolvency proceedings.

A BaFin spokesman declined to comment on the next steps for Wirecard Bank.