OMAHA, Neb. -- Online brokerage TD Ameritrade is buying Scottrade in a $4 billion cash-and-stock deal that would significantly expand its branch network at a time when many financial firms are expanding automated adviser programs.

In the two-stage deal announced Monday, TD Bank Group will buy Scottrade Bank first from Scottrade Financial Services Inc. for $1.3 billion in cash, and Scottrade Bank will be folded into TD Bank

Then, TD Ameritrade will buy Scottrade Financial Services for $2.7 billion in cash and stock. Part of that purchase will be financed by selling 11 million shares to TD Bank, which will continue to control 41 per cent of TD Ameritrade's stock.

TD Ameritrade said that the transaction adds significant scale to its retail business and more than quadruples the size of its network of about 100 branch offices.

TD Ameritrade CEO Tim Hockey said the branches should help it better serve clients and expand into more markets although the company will probably close about 150 of the 600 branches it will have after the deal.

"Financial decisions are very important to people and they like talking with someone they know and they can talk to in their community," Hockey said.

TD Ameritrade anticipates about $450 million in combined annual expense savings.

Combined, TD Ameritrade and Scottrade had $944 billion in total client assets and 600,000 average client trades per day for the year ended Sept. 30, on a pro forma basis.

"It gives us extraordinary scale," Hockey said. "With that scale, those investments in technology will be spread over more clients."

CFRA Research analyst Cathy Seifert cut her rating on TD Ameritrade's stock to "Hold" from "Buy" but she said the deal should provide a boost.

"We view positively AMTD's planned purchase, for $4B, of Scottrade Holdings, since it should help AMTD's slowing revenue growth," Seifert said.

Jefferies analyst Daniel Fannon said Scottrade is a good strategic fit with TD Ameritrade, and the deal makes sense given the potential cost savings.

Scottrade founder and CEO Rodger Riney will join TD Ameritrade's board.

The deal is targeted to close by Sept. 30, 2017.

In addition to the Scottrade deal, TD Ameritrade said its fourth-quarter profit declined 13 per cent to $185 million, or 35 cents per share, as trading slowed.

The company generates revenue from a combination of transaction fees, asset-based fees and investor education fees. Officials believe adding Scottrade's clients will boost revenue with more trades and more opportunities to offer investment advice.

TD Ameritrade's fourth-quarter results fell short of the 38 cents per share analysts surveyed by Zacks Investment Research expected.

TD Ameritrade said it expects to generate earnings per share between $1.50 and $1.80 next year excluding the Scottrade deal.

Shares of TD Ameritrade Holding Corp. declined $1.23, or 3.3 per cent, to $35.82 in afternoon trading Monday. Its shares have risen more than 6 per cent over the past year.