Morgan Stanley is buying online broker E-Trade for $13 billion, a move that shows how serious the Wall Street giant is about catering to everyday consumers.

Shares of E-Trade rose 24% in premaket trading on the news while Morgan Stanley fell more than 3%. The deal comes nearly three months after E-Trade rivals Charles Schwab and TD Ameritrade announced a $26 billion merger.

Discount brokers had to adapt their business models after just about every company in the industry eliminated commissions on online trades last year. That killed off what was once a lucrative revenue stream. As a result, Wall Street speculated E-Trade could be a takeover target for either Morgan Stanley or Goldman Sachs.

The deal is the latest chapter in Morgan Stanley’s transformation from the scrappy, deal-doing, stock-trading investment bank to a more well-rounded financial firm now more reliant on its asset and wealth management businesses.

According to the terms of the all-stock deal, E-Trade shareholders will receive 1.0432 Morgan Stanley shares for each share they own. E-Trade CEO Mike Pizzi will continue to run the firm once it becomes a division within Morgan Stanley.

Under CEO James Gorman, Morgan Stanley has shifted into new, more universal financial services that can bring in steady revenue when the more traditional parts of the bank’s business — trading and advising clients — slow down or suffer in difficult markets.

The strategy has worked. Morgan Stanley’s income has been less volatile, and the bank has been consistently hitting its profitability goals, and the bank had record profits last year.

“E-Trade represents an extraordinary growth opportunity for our wealth management business and a leap forward in our wealth management strategy,” Morgan Stanley Chairman and CEO James Gorman said in a prepared statement

Discount brokers like E-Trade have engaged in a vicious fight for customers since late last year, when Charles Schwab Corp. announced that it would eliminate the fees it charges customers for trades. Weeks later, Charles Schwab and TD Ameritrade Holding Corp. said they would merge, creating a massive rival for E-Trade.

Morgan Stanley will acquire E-Trade’s $360 billion in assets and 5.2 million customers as part of the merger, which Morgan Stanley can then turn around and use to start making loans. E-Trade has a popular online platform that helps businesses manage their employee stock plans, which will be merged into Morgan Stanley’s existing platform as well.

The deal is expected to close in the fourth quarter of this year, if regulators and shareholders approve it.

Shares of Morgan Stanley fell 3.7% before the market open, while E-Trade’s stock surged 24.1%.