By Patricia Kowsmann, Ruth Bender and Paul J. Davies

Wirecard AG's recently departed chief executive, Markus Braun, was arrested by police, days after the German payments company revealed a $2 billion hole in its books. It was a swift turn of events, but followed years of German regulators ignoring red flags about the once-promising company.

Munich city prosecutors said Mr. Braun turned himself in to authorities late Monday and accused him of "inflating Wirecard AG's sales volume with fake income." Prosecutors said he was also under suspicion of making the company look more attractive to investors and customers than it actually was, and possibly cooperating with other perpetrators.

He was released on EUR5 million ($5.7 million) bail Tuesday. Mr. Braun was Wirecard's largest shareholder and served as CEO for nearly two decades until resigning last Friday.

Wirecard began to unravel last week when its auditors said that it couldn't verify the existence of EUR1.9 billion ($2.1 billion) meant to be held in trust accounts on behalf of the company. The company later admitted the money was probably an accounting fiction.

Mr. Braun consistently denied any wrongdoing at the company, attacking allegations about its accounting practices as false and misleading. Mr. Braun's lawyers didn't immediately respond to a request for comment.

Mr. Braun's arrest by a city prosecutor is a black eye for Germany's national financial regulator, known as BaFin.

"In all this, BaFin runs the danger of looking like a cartoon and a joke, " said Marc Liebscher, whose Berlin-based law firm is representing private Wirecard investors.

The head of BaFin offered a mea culpa on Monday.

"I completely accept the criticism that all of us including BaFin have to review a couple of strategies and measures, which we have taken or have not taken, once we sort out the immediate crisis," BaFin President Felix Hufeld told a conference in Frankfurt.

Critics, including investors and politicians, say the scandal has exposed weaknesses at Germany's lead financial watchdog, ranging from a lack of staff qualified to oversee sprawling or complex businesses to siloed departments and a culture of passivity.

The episode undermines Germany's standing as Frankfurt competes against Paris and Amsterdam to become the European Union's top financial-services location after the U.K.'s departure from the trading bloc.

In 2016, two investors who bet on the company's shares to fall, issued a report accusing Wirecard of corruption, corporate fraud and weak money-laundering controls. The company denied the allegations at the time.

BaFin didn't take any steps to investigate the company's numbers.

Instead, last year, after the Financial Times published a series of critical articles about Wirecard's accounting, BaFin opened a probe against the lead reporter. It also took the uncommon step of banning short selling against the company -- the only time it had done so for a single entity.

A number of short sellers over the years have written, met with or tried to meet with regulators to raise concerns about Wirecard or the regulator's actions related to the company, according to several of them.

"You've got to believe that the lack of regulation in Germany will act as an encouragement for future frauds in the financial sector," said Christopher Hohn, who runs TCI Fund Management Ltd. His firm earned around $200 million from bets that paid off when Wirecard's shares plummeted, according to a person familiar with the firm.

BaFin declined to comment Tuesday.

BaFin turned its focus squarely on Wirecard earlier this year. The investigation looked at statements the company made ahead of the publication of a special auditors report conducted by KPMG AG looking into the accounting allegations against the company.

In March and April, the company told investors that no substantial findings had been made in KPMG's special examination.

At the end of April, KPMG said it was unable to answer key questions about the relationship between Wirecard and the outside third-party acquirer companies that generated the bulk of the company's revenue and profit. Its stock fell sharply after the report.

BaFin filed a criminal complaint to the Munich prosecutor, who searched Wirecard's offices in early June. The prosecutor at the time said the investigation would focus on Mr. Braun and other members of his executive team.

Mr. Hufeld said under current rules, BaFin, which supervises financial companies and regulates the market, doesn't have direct supervision of Wirecard because it is considered a technology firm.

But BaFin is the direct supervisor of its banking subsidiary, Wirecard Bank, which as of September had EUR1.7 billion in customer deposits, according to Wirecard. It is also in charge of fighting market manipulation, insider trading and misleading company statements to investors.

Wirecard's auditor, Ernst & Young GMBH, has also been criticized by investors for what they say was its repeated failure to detect what increasingly looked like fraud. Ernst & Young said its audit of Wirecard's 2019 accounts had uncovered doubts about the existence of EUR1.9 billion in cash balances on trust accounts.

"We are reviewing all new and emerging information in relation to Wirecard financial statements and will take all actions as appropriate," Ernst & Young added.

Fabio De Masi, deputy floor leader of Germany's Left party and a member of the Bundestag finance committee, said there was broader responsibility in Germany for the failure. BaFin is overseen by the federal finance ministry in Berlin, which is itself under the supervision of parliament.

While investors and journalists had warned for years about Wirecard, lawmakers turned a blind eye to what many in Berlin saw as the "German fintech wonder" Mr. De Masi said.

Now, lawmakers have summoned Mr. Hufeld on July 1 to explain BaFin's failure to dig into the scandal.

Florian Toncar, a lawmaker with Germany's pro-business Free Democratic Party, said BaFin operated too much like a government agency, with a working culture removed from the markets it oversees and their sophisticated products and participants.

German Finance Minister Olaf Scholz said regulators didn't work effectively in their supervision of Wirecard and called for an overhaul. "We must clarify quickly how we must change our regulatory rules to be able to also monitor complex corporate structures entirely, promptly and quickly," he said.

Under its supervision, Deutsche Bank, the country's scandal-ridden flagship commercial lender, showed repeated instances of weak money-laundering controls. Deutsche Bank is now mainly supervised by the European Central Bank, but BaFin still has considerable oversight of the lender.

BaFin also missed one of the biggest investment scandals in recent German history, when now defunct Munich-based company P&R Transport-Container GmbH spent years selling, leasing back and promising to repurchase fictitious containers to investors.

Thousands of small investors lost their money in 2018 when the firm went bankrupt. Politicians and investors said BaFin should have been more thorough in reviewing the company's products, which might have prevented the scandal. BaFin rejected the criticism at the time.

In late 2019, Bürgerbewegung Finanzwende, a German association fighting financial crimes, published a 50-page report entitled "The BaFin File: too despondent, too slow, too formal" that criticized BaFin as too passive in recent frauds and scandals. The agency, the report noted, often argued in hindsight that the cases in question didn't fall under its remit.

"The Wirecard scandal shows this again: Every time BaFin isn't explicitly and entirely in charge, it hides behind formalities and doesn't do anything," said Gerhard Schick, a former Bundestag lawmaker for the Greens and co-founder of Finanzwende.

Write to Patricia Kowsmann at patricia.kowsmann@wsj.com, Ruth Bender at Ruth.Bender@wsj.com and Paul J. Davies at paul.davies@wsj.com