Charles Schwab will acquire TD Ameritrade in a $26 billion, all-stock deal as the brokerage giants dramatically change a business model that has been crushed by the race to zero commissions.

The tie-up of the discount brokerage giants — which helped revolutionize stock trading by making it affordable and more accessible to the masses — reflects the industry’s shift from a commission-heavy revenue stream to one more reliant on interest income and client services.

“These companies have figured out other ways to make money,” said Jeffrey DeMaso, director of research at Adviser Investments. “Commissions simply weren’t as big a piece of Schwab’s business and revenue. By going to zero, they weren’t giving up much. But everyone else had to follow them. In the short term, it looks like a savvy competitive move by Schwab. Longer term, we’ll see.”

The combined company is expected to serve 24 million brokerage accounts and oversee more than $5 trillion in client assets.

“This would create a Goliath in wealth management,” wrote Wells Fargo’s Mike Mayo in an analyst note.

The combined company also would oversee more than $2 trillion, or 51 percent of the market, of what’s known as custody assets for registered investment advisers. That’s more than twice what the No. 2 player in this space, Fidelity Investments, manages, according to Scott Smith of Cerulli Associates, a Boston-based asset research firm. Advisers use such accounts to settle trades, move cash and perform other administrative tasks for clients big and small.

Smith said some investment advisers may have concerns about their clients getting lost in the merged company. “They are rightly worried they will be in a much bigger pond than they used to be,” said Smith, who is director of advice relationships at Cerulli. “Some advisers may think it’s not right for them, and that’s fine. There was going to be adviser migration whether or not this deal goes through. But I don’t think Schwab would have done this merger without valuing those relationships.”

“This news will force many of those advisers to decide whether to remain with a firm distracted by a long and complex integration,” said Nicole Abbott, a spokesperson for privately held Fidelity.

The deal announced Monday could face hurdles, Morningstar’s Michael Wong wrote in an analyst note. That includes the risk of antitrust scrutiny; a combined company with $5 trillion of assets would be significantly larger than its publicly traded peer E-Trade, which has about $500 billion of client assets. Still, Wong noted, other rivals like Fidelity, Vanguard, Bank of America and Bank of New York Mellon manage client assets from hundreds of billions to trillions of dollars.

San Francisco-based Schwab, the bigger of the two, is as much a bank as it is a brokerage firm. It manages more than $3.85 trillion in client assets, has a workforce of 19,500 and a market cap of $60 billion. It makes most of its money — around 57 percent — from interest on the uninvested cash that people leave in their accounts. Schwab invests that money at a higher return than it pays its clients. This year, it’s expected to earn more than $3 billion on more than $10 billion in revenue.

Omaha-based Ameritrade is a $26.2 billion company with more than $1.3 trillion in assets. It projects 2019 earnings of $2 billion on more than $5 billion in revenue. After Monday’s announcement, Ameritrade said it would suspend its search for a chief executive and designated Chief Financial Officer Stephen Boyle as interim president and CEO.

The planned merger gives Ameritrade stockholders 1.08 Schwab shares for each Ameritrade share. The deal has been approved by the boards of both companies, and the firms should be fully integrated in 18 to 36 months. The corporate headquarters would eventually move to Schwab’s new campus in Westlake, Tex.

The acquisition comes as financial management companies, from mutual fund giants like Fidelity to Schwab and Ameritrade, scramble to gain client share and assets by offering free trades. The competition has been heightened by retail investors choosing low- and zero-cost index funds and leaving the stock-picking market.

Wong, of Morningstar, said Schwab has the more vertically integrated business model, as it both manufactures and distributes financial products through its asset-management business. Ameritrade doesn’t have as much exposure to proprietary financial products, so there would be an upside for the merged company if Ameritrade’s customer base started to use Schwab’s products, like its exchange-traded funds.

In August 2018, Fidelity announced it was launching two zero-cost index mutual funds, escalating a price battle that could leave investors questioning whether to pay mutual fund management fees at all. Brokerage firms have followed suit. Online brokerage E-Trade last month eliminated commissions on client trades. Interactive Brokers Group recently began a new service called IBKR Lite, which also eliminated commissions for U.S.-listed stocks and exchange-traded funds.

“In a market experiencing significant contraction in fees and commissions, the merger makes a lot of sense,” said David Poppe, a former chief executive of investment firm Ruane, Cunniff & Goldfarb who owns Schwab shares in a personal account. “The combined company would get scale leverage on technology investments, public company costs and the back office, and would be able to exert even more pricing pressure on the rest of the industry.”

“Schwab also earns better spreads on customers’ cash balances than Ameritrade, so should be able to earn quite a bit more money on cash balances than Ameritrade does,” Poppe said. “It seems like a very smart combination.”

Schwab closed above $49 a share late Monday afternoon, an increase of more than 2 percent. Ameritrade closed above $51 per share, up more than 7 percent on the day.