Updated Oct. 21, 2019 4:44 pm: WeWork has reached an agreement to be taken over by SoftBank Group, in a deal that will value the embattled office-space company between $7.7 billion and $8 billion, people familiar with the matter told The Real Deal.

The deal would buy out some earlier investors and shareholders, and dilute the stake of former CEO Adam Neumann, those sources said. The final hour offer comes before a Monday deadline to submit bids for a financing agreement, according to the Wall Street Journal. It was unclear if agreement had been signed, and the high-level talks are fluid.

CNBC first reported that WeWork reached an agreement with SoftBank.

WeWork and SoftBank declined to comment. A spokesperson for Neumann wasn’t immediately available for comment.

As part of the agreement, the Japanese conglomerate would issue $5 billion in debt and a $1.5 billion tender offer. Its offer was chosen over a proposal from JPMorgan Chase that involved a $5 billion debt deal.

Under the deal, Neumann would no longer be non-executive chairman, and would serve as an adviser to the board. A special committee led by board members Bruce Dunlevie, of Benchmark Capital and Lew Frankfort, of Flywheel Sports, are in favor of making Marcelo Claure chairman. Claure, SoftBank’s COO and former CEO of Sprint, was handpicked by Masayoshi Son last month to fix WeWork’s ugly balance sheet.

The less than $8 billion valuation comes as a huge embarrassment to SoftBank, which has invested more than $10 billion in WeWork, and in January valued the company at $47 billion. SoftBank and its $100 billion Vision Fund own about one-third of WeWork.

The proposed agreement caps weeks of uncertainty at WeWork, which abandoned its IPO last month after failing to spark investor confidence in the company. Neumann has since stepped down from his role as CEO, and the company has scrambled to secure financing as it faced the prospect of running out of capital as early as next month.

According to its IPO S-1 filing to the SEC, the company committed $47 billion in lease payments to U.S. landlords over the next 10 to 15 years.