TD Ameritrade Holding Corp said on Monday it and Toronto-Dominion Bank would buy privately held Scottrade Financial Services in a deal valued at $4 billion, combining two of the biggest U.S. discount brokerages.

TD Ameritrade, the biggest U.S. discount brokerage by trade executions, said it would end up paying $2.7 billion for Scottrade's brokerage business after the sale of Scottrade Bank to Toronto-Dominion Bank's U.S. banking unit for $1.3 billion.

The $2.7 billion comprises $1 billion in new common TD Ameritrade shares and $1.7 billion in cash.

TD Ameritrade CEO Tim Hockey told CNBC's "Closing Bell" the deal is largely a scale play.

He said the company plans to consolidate the roughly 500 existing Scottrade branches and the 100 existing TD Ameritrade branches into about 450 locations total. He said the company will not leave any markets.

"We will make sure that we have the right locations in the right markets to serve both the Scottrade clients as well as the TD Ameritrade clients," he said. "We think of it as both high-tech and high-touch in the future."

The deal comes at time when discount brokerages are facing weak trading volumes and slow revenue growth as wealth managers cut fees amid intense competition.

Hockey said Rodger Riney, Scottrade's founder, CEO and controlling shareholder, was interested in partnering up with a larger firm like TD Ameritrade to take advantage of the investments it's made in its technology, platforms and "leading-edge tools and products."

Riney will join TD Ameritrade's board after the close of the deal, the companies said. The Scottrade founder and chief executive said last year he was being treated for a form of blood cancer.

TD Ameritrade, which is 42 percent owned by Toronto Dominion Bank, said it expected to save about $450 million annually in combined expenses and more than $300 million in "additional longer-term opportunities" once the deal closes.

The deal is expected to close by Sept. 30, 2017, the companies said. Barclays Capital is financial adviser to TD Ameritrade, while Wachtell, Lipton, Rosen & Katz is legal adviser. Goldman Sachs is advising Scottrade, with Sullivan & Cromwell acting as legal adviser.

—CNBC's Antonio José Vielma contributed to this report.

