General Electric is giving up full control of its century-old rail division as the conglomerate's empire continues to shrink.

GE (GE), an early pioneer of the locomotive industry, agreed on Monday to merge the struggling rail business with rival Wabtech (WAB) in an $11 billion deal.

The transaction will raise $2.9 billion for cash-strapped GE, which has promised to sell off various businesses to pay down debt and stabilize its balance sheet.

GE had owned the rail business, now known as GE Transportation, since 1907 and eventually turned it into one of the largest makers of freight locomotives in North America. Besides making trains, the business and its 9,000 workers also manufacture mining equipment and marine motors.

Related: GE warns its subprime unit could file for bankruptcy

Under the terms of the deal, GE will receive a 9.9% stake in the combined company and GE shareholders will own about 40.2%. GE will be required to unload its stake within three years, making an exit from the rail business.

GE's rail business was booming in 2014 thanks in part to high prices for metals and oil. However, the industry hit a snag in recent years as commodities slumped, leading GE to decide to back away.

"It's a depressed market. It will probably be a long cycle before it gets better," said Gautam Khanna, an analyst at Cowen.

By joining forces, the companies say they will be better positioned to emerge stronger from the industry wide slump. The new company will generate about $8 billion in revenue, have around 27,000 employees and be a leader in major freight rail and transit markets around the world.

Related: Has GE finally turned a corner?

GE and Wabtech predict the deal will create about $250 million in annual cost-savings as well as other financial benefits. The companies said the tax-free deal is expected to close in early 2019, pending regulatory and other approvals.

Wabtech, formerly known as Westinghouse Air Brake Technologies, is celebrating its 150th anniversary in 2019.

The deal comes as GE is racing to stop a cash crisis that caused its stock to plunge 45% last year. That's prompted speculation that the storied company could get kicked out of the Dow. GE cut its dividend in half and announced plans to lay off 12,000 workers in its beleaguered power division late last year.

In an effort to raise cash, GE has promised to sell off about $20 billion worth of businesses, including its iconic light bulb unit. GE has even signaled a willingness to consider an outright break-up of the conglomerate.

Related: Workers, shareholders call GE an 'embarrassment'

Over the past 15 years, GE has also sold off NBC Universal, its appliance business and most of GE Capital, the massive financial arm that nearly killed the company during the financial crisis.

While GE's empire has shrunk, its total debt has nearly tripled since 2013, according to Moody's. That includes a massive pension shortfall of $28.7 billion, the highest in the S&P 500.

GE's rail deal will not help its pension problem. Even though GE is selling the rail business, the US pension and retiree health liabilities will not transfer to the new company, a person familiar with the matter told CNNMoney.

Even after the rail deal, GE will continue to make everything from MRI machines and power plants to jet engines.

GE shares, which have tumbled 12% this year, rose about 3% on Monday.