WeWork has agreed to be taken over by its largest outside investor, SoftBank, two people with knowledge of the matter said, in a deal that ends weeks of uncertainty for the troubled shared office space company.

SoftBank had invested about $10.5 billion in WeWork. It will now have to pour billions more into the company, cut costs and stabilize the business.

The sale marks a humbling moment for WeWork. It values the company at just under $8 billion, compared to the $47 billion that SoftBank reckoned it was worth in January, people with knowledge of the bid said Monday.

Not long ago, WeWork had been seeking to sell shares to stock investors to keep funding its growth. But that initial public offering was scrapped last month after Wall Street investors balked at its huge losses and unusual corporate governance structure.

In addition to the takeover offer from SoftBank, WeWork’s board had also been considering a $5 billion debt financing offer from JPMorgan Chase.

The SoftBank deal will mean a huge payout for Adam Neumann, WeWork’s co-founder who stepped down as chief executive last month. Under Neumann, the company grew at a breakneck pace, drawing ardent backers like SoftBank’s chief executive, Masayoshi Son, and making Neumann wealthy.

Advertising

But prospective investors for the company’s initial offering were skeptical of his leadership, and existing WeWork backers — including SoftBank — pushed for his ouster.

Yet Neumann will receive roughly $1.7 billion in consideration as part of the SoftBank deal, according to the people with knowledge of the offer. The Tokyo-based technology giant will buy roughly $1 billion worth of WeWork shares from him, and give him about $500 million worth of financing to repay a credit line from JPMorgan. Neumann also will receive a $185 million consulting fee.

In exchange, he will back the SoftBank deal and step down from WeWork’s board.

As part of the agreement, SoftBank will accelerate a $1.5 billion investment in WeWork that it had planned to make next year, and it will help assemble a $5 billion loan from a consortium of financial institutions, including itself.

WeWork is not the only SoftBank-backed company to run into trouble. SoftBank, led by Masayoshi Son, and its $100 billion Vision Fund have also poured money into Uber and Slack, whose stock prices tumbled after they started trading on the stock market several months ago.

The Wall Street Journal previously reported the terms of the WeWork-SoftBank deal.