Electronic trading firm Getco Holdings announced in a press release Wednesday that it will acquire Knight Capital Group (NYSE: KCG) for $1.4 billion. The two companies will be combined under a new holding company to be publicly traded at the completion of the merger.

The deal offers Knight shareholders $3.75 per share, a premium of more than 13% over its Tuesday closing price. It's a victory for Knight after its software trading glitch in August led to a trading loss of more than $400 million and nearly resulted in bankruptcy for the company. Getco was one of a group of investors that bailed out Knight during the fiasco.

Knight Chairman and CEO Thomas M. Joyce summarized   the rationale for the deal in Getco's release, saying, "The transaction provides near-term certainty in the form of cash, while also allowing shareholders to benefit from participation in the future success of the firm."

Shares of Knight surged on the day, picking up 6% in afternoon trading to eclipse the $3.50 per-share mark.