Days before the MF Global brokerage firm collapsed, leaving many of its clients without access to their money, a top executive was troubled that the firm appeared to be putting customer funds at risk, the executive says.

In testimony prepared for a Wednesday hearing, the firm’s former chief financial officer, Christine Serwinski, says she learned that there was “a substantial deficit” in a financial buffer that was supposed to ensure that customer funds were safe.

When she asked why there was a shortfall, she learned that one part of MF Global had borrowed money from another “and had missed the wire deadline to pay it back,” Serwinski says in the testimony.

Such “intraday” lending was not unusual, Serwinski says, “but the loan should have been paid back before” the previous day’s close of business.

Over the next several days, the sinking parent company, headed by former U.S. senator and governor Jon S. Corzine (D-N.J.), struggled to stay afloat and to find a buyer. Then, in the pre-dawn hours of Monday, Oct. 31, MF Global told regulators that money was missing from customers’ accounts, the sale fell apart, and the parent company sought bankruptcy protection.

The latest estimate by the trustee overseeing the liquidation of the brokerage is that $1.6 billion of clients’ money is missing.

Wednesday’s congressional hearing is likely to shed further light on MF Global’s frantic final days, when, even as it continued to do business, its finances were spinning out of control.

Testimony submitted for the hearing shows how a major modern financial firm that is supposed to operate under strict controls and regulatory supervision can descend into chaos.

“It was a time of constant pressure and little or no sleep,” Henri J. Steenkamp, chief financial officer of parent firm MF Global Holdings, says in prepared testimony.

MF Global left itself vulnerable by investing heavily in European debt. Then, in late October, it suffered a ratings downgrade and announced a quarterly loss of $191.6 million, which led to its stock losing nearly half its value in a single day, Oct. 25.

Serwinski says that she was on vacation on Oct. 27, a Thursday, when she received word that the financial buffer had shown a deficit on the day before.

The firm could have remained in compliance with the rules even if that buffer eroded, Serwinski says. Nonetheless, “I had stated clearly and repeatedly” that the firm should keep the buffer intact, she says.

“To me, even though the regulations would allow it, I was not comfortable with the firm putting customer funds at risk even just overnight in that manner,” she says.

Amid a fog of confusion, MF Global insiders’ understanding of the firm’s financial picture continued to change, according to testimony.

By the Friday of MF Global’s final week, Serwinski says, an internal report showed that the buffer was back in place. On Saturday, it first appeared that there was a shortfall in customer funds, then it appeared that the deficit was the result of an accounting error, Serwinski says.

Before boarding a flight back to Chicago on Sunday, Oct. 30, Serwinski was told the shortfall in customer funds was almost $1 billion, she says.

“At the time, I did not believe this was possible,” Serwinski says.

Testimony posted by the House Financial Services Committee also shows that one of MF Global’s major banks, J.P. Morgan Chase, repeatedly sought assurances during MF Global’s last days that big wire transfers arranged by MF Global complied with regulations meant to protect clients’ money and restrict a brokerage firm’s use of it.

J.P. Morgan three times asked MF Global to sign statements vouching for the propriety of its actions, Laurie Ferber, former general counsel of parent MF Global Holdings, says in testimony submitted for the hearing.

The first and second drafts that the bank asked MF Global to sign were too broad, partly because they encompassed future wire transfers, Ferber says.

The third version referred specifically to a pair of transfers: the movement on Oct. 28 of $200 million from an account for customer funds to an MF Global account, and a subsequent transfer from that MF Global account to another to cover an overdraft, Ferber says.

A J.P. Morgan lawyer is slated to testify at the hearing.