(Bloomberg) -- A Kansas bank that failed last July after its chief executive officer allegedly siphoned off funds to buy cryptocurrency drew $21 million from the Federal Home Loan Bank System shortly before collapsing, according to a regulatory review.

Heartland Tri-State Bank’s sudden use of FHLB financing in its final weeks was an abrupt turnabout, the inspector general of the Federal Reserve and Consumer Financial Protection Bureau found in a Feb. 7 report. In the prior three years, the firm didn’t borrow anything from the US-backed system, which helps support home lending.

Altogether, Heartland almost completely tapped out its sources of cash — also drawing $24 million from lines of credit with a correspondent bank — to fund improper wire transfers, the report found. This month, the Justice Department charged Heartland’s former leader, Shan Hanes, with embezzling $47.1 million from the company as part of a so-called pig-butchering scheme, in which victims are lured into giving ever-more money, like pigs fattened for slaughter.

Read More: Bank Failure That Rocked Tiny Kansas Town Began With Crypto Scam

The mission of the $1.3 trillion FHLB system has become a hot topic in Washington after it propped up lenders including Signature Bank, Silicon Valley Bank and First Republic Bank that imploded last year after catering to crypto firms, venture capitalists and the ultra-wealthy. Proponents of the system say that beyond supporting the mortgage market, FHLBs provide stability to banks at times of economic stress.

The abrupt collapse of Heartland shook the surrounding Elkhart community in southwest Kansas, added to a string of regional-bank failures and culminated in another hit to the Federal Deposit Insurance Corp.’s insurance fund. The agency estimated in July that Heartland could cost its fund $54 million.

The inspector general’s report doesn’t specify which home-loan bank provided the burst of financing before Heartland’s seizure, nor does it fault the system. A separate government listing shows Heartland was a member of the FHLB of Topeka, Kansas.

Read more: Why US Is Overhauling Federal Home Loan Banks: QuickTake

Representatives for that institution didn’t immediately respond to messages seeking comment. Banks typically put up mortgages and other collateral to receive their “advances,” ensuring FHLBs get repaid.

Heartland’s former CEO hasn’t responded to messages seeking comment on the criminal case. His initial court appearance is set for Feb. 28, the Justice Department said Monday.

In November, the Federal Housing Finance Agency, which regulates home-loan banks, proposed a slate of reforms to refocus the system on addressing the country’s housing needs. The measures would likely require years of work by lawmakers and regulators to be enacted and are already facing fierce lobbying.

©2024 Bloomberg L.P.