In this Jan. 16, 2018 file photo, Adam Neumann, co-founder and CEO of WeWork, attends the opening bell ceremony at Nasdaq, in New York. The Wall Street Journal, citing sources it did not identify, reported Tuesday, Oct. 22, 2019, Neumann will walk away with close to $2 billion from Japan's SoftBank Group if he severs ties with the company. (AP Photo/Mark Lennihan, File)

WeWork is accepting a financial rescue package that hands control of the company to Japanese tech giant SoftBank and pushes aside co-founder Adam Neumann and his grandiose vision of changing the world through communal working.

WeWork said in a statement that Japanese tech conglomerate SoftBank will infuse the We Company with more than $5 billion in urgently needed capital.

Neumann reportedly would walk away with nearly $2 billion to sever most of his ties to the company.

"SoftBank is a firm believer that the world is undergoing a massive transformation in the way people work. WeWork is at the forefront of this revolution," SoftBank's founder Masayoshi Son said in a statement.

"Since the vision remains unchanged, SoftBank has decided to double down on the company by providing a significant capital infusion and operational support. We remain committed to WeWork, it's employees, its member customers and landlords," he said.

WeWork has been scrambling for cash since its attempt to enter the floundered last month, a stunning fall from grace for a company that has until recently been considered one of the most highly valued start-ups in the U.S.

The deal throws WeWork a lifeline as it attempts to turn around a money-losing business model that had repelled potential Wall Street investors. But it comes at a steep cost for SoftBank, which already owns one-third of WeWork and has sunk $10 billion into the company.

SoftBank's takeover would value WeWork at $8 billion, a fraction of the $47 billion valuation SoftBank had assigned the company in its last round of financing in January.

The contours of the deal mean SoftBank now has more money invested in WeWork than the company is worth.

"This is where the math gets confusing because they've put in more money than the valuation of the company," said Larry Perkins, founder and CEO of SierraConstellation Partners, a management advisory firm that specializes in helping companies navigate difficult turnarounds. "That would be the question going forward: Is this good money after bad money or a preservation of their investment?"

SoftBank will pay Neumann $1 billion for his shares in the company and extend him $500 million in credit to help him repay a loan from J.P. Morgan., the Wall Street Journal reported. SoftBank also will pay Neumann a $185 million consulting fee, it said.

Neumann stepped down as CEO under pressure last month, but he retained a controlling share of the company, making his approval necessary for any deal. He will step down from WeWork's board of directors but retain a small stake in the company.

In this Oct. 6, 2019, photo people walk by WeWork offices in Dublin, Ireland. The Wall Street Journal is reporting on Tuesday, Oct. 22, that WeWork is being taken over by the Japanese investment bank that invested billions in the company before its botched effort to go public. (AP Photo/Mark Lennihan)

"He gets a golden helicopter that lets him get out of this, and that is just remarkable," Perkins said.

The SoftBank deal eases WeWork's immediate cash crunch, but the company faces a long road ahead to address its deeper challenges, namely finding ways to curtail its staggering spending.

WeWork mostly makes money by leasing buildings and subdividing them into office space that it sublets on a short-term, flexible basis.

Since the failed IPO, WeWork has taken steps to shore up that core business and move away from the meandering direction it had taken under Neumann.

Neuman, who grew up partly in a kibbutz, had dazzled private investors with his vision of creating workspaces that foster communality and cater to the overall well-being of its members. The company launched side businesses including a fitness company called "Rise by We" and the co-living rental company "WeLive."

Those projects now appear on the chopping block. Last week, WeWork announced it would close WeGrow, its newly launched Manhattan elementary school. Days later, the company scrapped a deal with a top Seattle real estate firm for a building that would combine its WeWork offices spaces with its WeLive communal apartment rentals.

WeWork, which has locations in 111 cities around the world, is also slowing its expansion plans. Last week, the company canceled plans to lease space in U.S. Steel Tower, Pittsburgh's tallest building.

But the company could face an uphill battle to curb costs related its future lease obligations, which amounted to $47.2 billion as of June 30. Most of its leases don't have provisions to let the company end them early, and the average initial term of its U.S. leases is 15 years.

"It's a huge liability. There's a very blunt option called bankruptcy that I'm sure everyone wants to avoid. It would be a last resort, but I'm sure it's an option that is on the table if they can't get out of leases peacefully," Perkins said.

WeWork had few palatable options after pulling out of the IPO, which the company had been counting on to raise $9 billion in stock and related debt financing.

The decided to accept SoftBank's offer over a high-risk debt-financing proposal from J.P. Morgan Chase & Co., which had been the lead underwriter of the failed IPO.

WeWork was sitting on $2.5 billion in cash and cash equivalents at the end of June, but it burned through nearly $199 million in the first six months of the year just operating its business.

On top of that, it spent $2.36 billion on new leases and other investments, an amount that had been offset by $3.43 billion raised though venture capital and high-yield debt. A person familiar with the negotiations said WeWork had been on track to run out of cash by the end of November without the new financing.