With a potential bankruptcy filing looming, Knight Capital (KCG) unveiled a $400 million rescue on Monday that will keep the embattled market maker in business but massively dilute existing shareholders.

The emergency lifeline comes after a dramatic weekend of negotiations aimed at saving Knight Capital, which has been thrown into a life-or-death struggle following a trading glitch last week that cost the firm at least $440 million.

It also emerged on Monday that Blackstone (BX) had been ready to take Knight private in a leveraged buyout before the trading glitch but the private-equity giant has since scrapped those plans.

In a regulatory filing and pair of statements before markets opened, Knight said it has reached a pact with a slew of Wall Street firms to sell $400 million of 2% convertible preferred stock. 

The preferred shares will be convertible into about 267 million shares of the company, which currently has just 98.21 million shares outstanding. The shares can be converted into common stock at $1.50 a share.

Jersey City, N.J.-based Knight Capital said it received equity financing from midsize investment bank Jefferies (JEF), discount brokerage TD Ameritrade (AMTD), Blackstone, rival market-maker Getco, financial-services firm Stifel Financial (SF) and Arkansas-based Stephens. 

"We are grateful for the support of these leading Wall Street firms that came together to invest in Knight," Knight Capital CEO Tom Joyce said in a statement. "With our financial position strengthened and liquidity restored, we will continue to provide clients with trading in a broad range of securities, high-quality execution and outstanding client service."

Underscoring the heavily dilutive nature of the rescue, shares of Knight plunged on Monday after the deal was disclosed. Knight's shares tumbled 24.20% to close at $3.07 leaving them 70% in the red since closing at $10.33 the day before the trading glitch occurred. 

In another sign of how battered Knight shareholders have been, Blackstone was prepared to pay $1.2 billion to take Knight private before last week's trading glitch, FOX Business's Charlie Gasparino reported. That price tag is four times Knight's market cap of $301.5 million at the close of trading on Monday.

The two sides had been in talks for six months. In fact, Jefferies ended up using Blackstone's "extensive" due diligence on Knight in this week's bailout, earning a $20 million fee in the process, Gasparino reported. 

Normally the dilutive share sale would have required shareholder approval, however Knight said its audit committee decided delaying the approval process would "seriously jeopardize the financial viability of Knight." 

Without the rescue, Knight told the New York Stock Exchange it would have been struck with a "liquidity situation" that would have cut off its access to short-term funding necessary to run the business. Knight said the NYSE didn't object to this exception to the exchange's rules and expects to approve the company's listing application.

Knight also said it has committed to expanding its board of directors by adding three new members, but didn't specify who would be joining the board.

It’s not clear yet whether the last-minute rescue that will severely dilute current shareholders will be enough to save the job of Joyce, a longtime figure on Wall Street. 

Joyce is likely to be under heavy pressure from the trading loss and a probe by the Securities and Exchange Commission aimed at determining if executives failed to follow new trading rules when executing the computerized trade that fueled last week’s huge losses, Gasparino reported.

"Joyce may have saved the firm in the short run but someone has got to take responsibility for something that destroyed so much shareholder value," a source with direct knowledge of Knight’s management told FOX Business.

The stunning $440 million trading loss wiped out a huge chunk of the capital base of Knight Capital, which has a market capitalization of just under $300 million. 

The software glitch caused Knight to unintentionally scoop up around $4.5 billion of stock. A subsequent refusal by the SEC to cancel the vast majority of the trades imperiled the firm’s very existence.

Knight had reportedly been in talks on various deals with a slew of firms, including electronic-trading and market-making firm Virtu, Chicago-based Citadel LLC, futures brokerage and clearing firm R.J. O’Brien and private-equity firms KKR, TPG and Silver Lake.

"Knight's financial position and capital base have been restored to a level that more than offsets the loss incurred last week. We thank our clients, employees and partners for their steadfastness during a brief yet difficult period and we are getting back to business as usual," said Joyce. 

Meanwhile, Big Board parent NYSE Euronext (NYX) temporarily reassigned Knight Capital’s designated market maker responsibilities to Getco.

The New York Stock Exchange noted its rules allow the temporary reallocation of any security whenever it believes such a move would be “in the public interest.”

However, the Big Board pledged to reassign Knight’s Designated Market Maker responsibilities after the company completes and approves a recapitalization plan.

“Our first priority is to ensure market integrity and an orderly trading environment in which investors and all market participants have confidence,” Larry Leibowitz, NYSE Euronext’s chief operating officer, said in a statement.

Knight Capital said it was advised on the equity financing deal by Sandler O'Neill. 

Follow Matt Egan on Twitter @MattMEgan5