WeWork has been thrown a multi-billion-dollar lifeline from Softbank that will give the Japanese company more control of the troubled property start-up.
In a statement, Softbank said it would provide $5bn (£3.9bn) in new financing and up to $3bn for existing shareholders.
The deal will see Softbank increase its stake in the US office-space sharing start-up to roughly 80%.
Co-founder Adam Neumann will leave the board but retain "observer" status.
The deal marks the end of a tumultuous period for WeWork - once valued at nearly $50bn - that saw Mr Neumann step down as chief executive as questions over his leadership emerged.
The former boss is expected to be handed a sizeable payout. The Wall Street Journal reported the deal could see Mr Neumann receive nearly $1.7bn as he sells his shares in the company and through other fees.
Under the agreement, Softbank will "accelerate" an existing commitment to fund $1.5bn, in addition to new financing and issuing a tender offer for existing shareholders.
The Japanese investment giant already owned about a third of WeWork.
"Softbank has decided to double down on the company by providing a significant capital infusion and operational support," Softbank chairman Masayoshi Son said in a statement.
"SoftBank is a firm believer that the world is undergoing a massive transformation in the way people work," he said.
Marcelo Claure will take over as executive chairman of the WeWork board.
The bailout will supply much-needed funds to WeWork and follows the collapse of plans to raise money via a stock market listing.
The company, which rents shared office space and helped to popularise co-working, has grown from a single office in New York City to more than 500 locations around the world. But it lost about $900m in the first six months of this year.
The firm's share offering received a lukewarm reaction from investors, who raised concerns about the firm's financing and governance. WeWork officially dropped the flotation plan last month.
Questions about its complicated financial ties to Mr Neumann also frustrated plans and led to him stepping down from the top job.
The 40-year-old billionaire built WeWork in his own image, creating a buzzy, multi-billion dollar company known with a stated mission to "elevate the world's consciousness".
But the co-founder's brash charisma, which once attracted investors, emerged as a liability.