Billionaire Elon Musk appears to have changed his mind about buying Twitter yet again and is now ready to proceed with the original Twitter deal.

Mr. Musk agreed to pay the price he offered months ago in a letter to the company before attempting to back out of the deal.

The surprise U-turn came just weeks before the two sides were due in court.

A few weeks after Musk agreed to the deal, valuing Twitter at $44 billion, he quickly tried to back out, officially informing the company in July of his intentions to terminate the agreement.

Twitter, which sued Mr. Musk in July to force him to complete the $44 billion deal, has yet to accept his new proposal and intends to add conditions to ensure he does not change his mind again. Musk alleged that Twitter was misstating the number of “bots” on its service as one of the reasons he was reneging on the deal. He and his lawyers claimed the social media company was misleading investors by providing false numbers in corporate filings with the Securities and Exchange Commission.

Twitter sued Musk musk for trying to pull out of their $44 billion deal to buy the social media platform and asked a Delaware court to order him to complete the merger at the agreed $54.20 per Twitter share. The two sides were scheduled to go to trial in Delaware Chancery Court on Oct. 17.

Twitter issued a brief statement in which it stated that it had received Mr. Musk’s letter and reiterated the company’s intention to complete the transaction. According to three people familiar with the company’s plans who were not authorized to speak publicly about them, Twitter may ask a court in Delaware, where it filed its suit, for protections that would compel Mr. Musk to follow through on his new proposal. One of those people added that the company could also demand that Mr. Musk pay interest on the deal price for the delays in completing the acquisition.

The apparent win for Twitter sent its shares soaring more than 20% to more than $52 apiece. But the value remained lower than the takeover price