Knight Capital Group Inc. (NYSE:KCG) which was on the brink of bankruptcy last week, signed a $400 million recapitalization deal with a group of investors, many of them being the customers of Knight. In Wednesday’s trading mishap, Knight lost $440 million. Though the firm has survived after receiving emergency funding, it has temporarily lost its market making capabilities.

Knight Capital

In the $400 million rescue deal, the investors – Getco, Jefferies Group, Inc. (NYSE:JEF), Stifel Financial Corp. (NYSE:SF), Nicolaus & Company, TD Ameritrade Holding Corp. (NYSE:AMTD), and the Blackstone Group – will be purchasing Knight Capital Group Inc. (NYSE:KCG)’s preferred stocks, worth $400 million, convertible into common stock. Under the deal, the new investors will get 267 million shares of the brokerage firm, which gives Knight shares a value of roughly $1.50 per share. Before the trading losses last week, Knight stocks were trading at over $10 per share.

The deal will heavily minimize the stake of existing shareholders. New investors will be purchasing the 2 percent preferred shares, and they’ll own 73 percent of Knight once preferred stocks are converted in common shares, according to Bloomberg.

“We are grateful for the support of these leading Wall Street firms that came together to invest in Knight,”  said Tom Joyce, chairman and CEO of Knight Capital. “The array of participants in this capital infusion underscores Knight’s critical role in the capital markets.”

On Wednesday, Knight Capital Group Inc. (NYSE:KCG) was unveiling a new trading software when the problem started. Using the software, Knight was expected to offer investors the best price. The new program “experienced a human error and/or a technology malfunction related to its installation of trading software.” Due to this error, Knight started placing orders to buy shares of the big US corporations, including American Airlines, Ford Motors and RadioShack. Finally, Knight Capital had to sell off all these shares bought erroneously, resulting into a loss of $440 million.

In a regulatory filing, the company said, “In view of the impact to the company’s capital base and the resultant loss of customer and counterparty confidence, there is substantial doubt about the company’s ability to continue as a going concern.”

Knight CEO Thomas M. Joyce started contacting the potential suitors and restructuring lawyers to get short term financing, or file for Chapter 11 bankruptcy, according to the New York Times. Things turned into his favor when Goldman Sachs agreed to purchase the erroneously accumulated shares at a discounted rate, before finalizing the rescue deal with investors on Sunday.

“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 Mr. Joyce.

The company’s market making capabilities have been assigned to Getco by NYSE. Knight Capital Group Inc. (NYSE:KCG) will resume the market making duties, once the refinancing plan is complete.