Ending a weeks-long bidding war, market maker Knight Capital Group (KCG) agreed to a sweetened buyout bid on Wednesday from high-speed trading firm Getco worth $1.4 billion.

By raising its offer price for Knight Capital, a key cog in the financial system, Chicago-based Getco beat out rival high-speed trading firm Virtu.

The transaction gives existing shareholders at Knight Capital the right to $3.75 per share in cash or one common share in the new holding company.

The $3.75-a-share bid represents a 51% premium to Knight’s closing price on November 23, the last trading day before the Getco bid emerged. Getco initially offered $3.50 a share for Knight.

However, Knight had traded around $12 a share back in July before a trading glitch nearly collapsed the company and forced a bailout, which  included Getco.

FOX Business’s Charlie Gasparino first reported details of the deal late Tuesday following a board meeting at Knight Capital.

Based in Jersey City, N.J., Knight Capital serves as a market maker for transactions, especially from retail brokerages like TD Ameritrade (AMTD).

Knight CEO Tom Joyce, a powerful figure on Wall Street, is set to become executive chairman at the new combined company, while Getco CEO Daniel CEO will keep his current title.

Virtu had proposed taking the entire company private, but at a lower share price.

After a “thorough evaluation” Knight’s board unanimously decided the Getco deal “provides the best possible value creation opportunity” for Knight shareholders,” said Joyce.

“Broker-dealers and institutions will continue to experience the same industry-leading execution quality and client service they've come to expect from Knight, with the additional liquidity-enhancing capabilities of Getco’s renowned technology,” Joyce said.

As part of the deal, Getco members will receive 233 million shares in the new holding company and the 57 million Knight shares they currently own will be retired. Instead, Getco is set to receive a series 75 million warrants in the new holding company at various prices.

“Market participants will benefit from industry-leading services, and our larger capital base will provide strong support for existing operations, as well as an attractive currency for growth,” Coleman said.

The companies expect a deal will be completed in the second quarter of next year, subject to shareholder and regulatory approval.

Getco said it has received financing commitments for the deal from middle-market investment bank Jefferies (JEF), which is the largest shareholder in Knight.

Investment firm General Atlantic, which owns 25% of Getco, also agreed to make an additional $55 million equity investment, bringing its total investment in the new company to over $400 million.

Shares of Knight Capital rallied 6.61% to $3.55 Wednesday morning on the news. New York-based Jefferies dipped 0.05% to $18.71.

Follow Matt Egan on Twitter @MattMEgan5