Virtu Financial Inc. (Nasdaq: VIRT) agreed to acquire high-speed trading rival KCG Holdings Inc. for $1.4 billion, tying up two giant market makers as industry profits shrink.

Virtu is paying $20 per share in cash for KCG, funding the transaction by selling $1.65 billion in debt and $750 million of stock, according to a statement. KCG, which fetched less than $14 before Virtu confirmed it bid for the company in March, surged 11 percent to $19.69 at 8:15 a.m. New York time. Virtu jumped 4.7 percent.

“That’s a tremendous amount of value being created for Virtu shareholders,” Virtu chief executive officer Doug Cifu said in an interview Thursday. Virtu, which has acted as a market-maker for the majority of its existence and only recently started doing transactions for customers, is seeking to broaden its access to institutional and retail clients. KCG has hundreds of customers they arrange trades for in their agency business, Cifu said, while Virtu has fewer than 10. Putting the two companies together in a deal expected to close in the third quarter should result in about $208 million of cost savings, Cifu said.

This marks a major strategy shift for Virtu, a lean company that automates as much as it can. With KCG, it will get a trading firm with six times as many workers, including human sales traders that Virtu has eschewed. That poses a risk for Virtu, a UBS Group AG analyst wrote recently. Virtu signaled a year ago that it was seeking new sources of revenue when JPMorgan Chase & Co. agreed to use Virtu’s technology to trade Treasuries.

Although New York-based Virtu and KCG compete in markets including stocks, futures, currencies and bonds, the deal pushes Virtu into business lines it has shied away from. That new terrain includes carrying out trades for big money managers and filling individual investors’ trades on behalf of retail brokerages such as E*Trade Financial Corp. and TD Ameritrade Holding Corp.

The headcount differences between the firms are stark. At the end of 2016, KCG had about 950 employees versus about 150 at Virtu.

“There’s some overlap,” Cifu said during the interview. “We don’t know a lot about the customer business but we’re not going to go in and decimate the place,” he said. “We’re doing this to buy customer franchises so we’re not going to screw that up.”

High-frequency traders are struggling with shrinking income and low volatility. Revenue at U.S. stock market-making firms has eroded, falling to $1.1 billion in 2016, compared with $7.2 billion in 2009, according to estimates from research firm Tabb Group LLC. That’s coupled with rising costs of the data feeds, surveillance and technology they need to do business.

Virtu’s stock has dropped by a fifth since its initial public offering two years ago. KCG rallied more than 43 percent during the same period.

“We view the move as a change in Virtu’s strategy, after stressing a commitment to its streamlined core business, a lack of interest in certain business lines (e.g. retail equities market making and high-touch agency execution), and a general aversion to adding headcount,” UBS analyst Alex Kramm wrote in a report after Virtu’s bid emerged in March.

Market-makers including Virtu use sophisticated algorithms to serve as middlemen in trades, buying from sellers and selling to buyers, picking up pennies along the way. KCG’s business goes beyond that; it’s forced to shoulder more risk to get trades done for its big money manager clients.

Robert Greifeld, the former CEO of Nasdaq Inc. who’s now chairman of the exchange, and Silver Lake co-founder Glenn Hutchins are investing in Virtu as part of the transaction. Their company, North Island, is investing $625 million along with GIC, Singapore’s sovereign wealth fund, and a Canadian pension called the Public Sector Pension Investment Board. Temasek, already a Virtu shareholder, will buy $125 million more equity in the company. Greifeld and Hutchins will also join Virtu’s board.