Elon Musk has performed a surprise u-turn on his $44 billion Twitter buyout and is set to now complete the purchase after months of legal wrangling.

The case has seen whistleblowers, lawyers and executives from other companies called to give evidence, but now Musk appears to have changed his mind.

The Guardian reports Musk’s lawyers confirmed the Tesla billionaire is prepared to push ahead with the deal, despite months of saying he’ll pull out due to a row over the number of bots which use the social media site.

READ MORE: ELON MUSK GETS VERY BLUNT RESPONSE AFTER TWITTER POLLING OVER ENDING RUSSIAN INVASION OF UKRAINE

The news followed Bloomberg reporting Musk had written to Twitter offering to close the deal at the original price of $54.20 a share.

This led to the company’s stock rocketing by more than 12 percent.

The court showdown was set for later this month, and many legal commentators warning he was likely to lose in his attempt to get the deal scrapped.

The noticed, filed to the Delaware chancery court, said: “We write to notify you that the Musk parties intend to proceed to closing of the transaction.

Need Career Advice?Get employment skills advice at all levels of your career

The filing added that the adjournment of the Delaware trial and securing of debt financing are preconditions.

Twitter said in response: “The intention of the company is to close the transaction at $54.20.”

Although it did not give more specific details in its response to Musk’s about-turn.

Anat Alon-Beck, a law professor at Case Western Reserve University in Ohio, told The Guardian Musk appeared to be “finally listening to his lawyers”.

Musk was due to be questioned under oath by Twitter’s lawyers this week as part of preparations for the trial.

She said: “He will be a fool to not at least try to buy the company now and avoid [a deposition].”

She said the move has eliminated the upcoming trial, but the sale process is likely to last for a while yet.

She said: “It’s not like this is going to be cleared up tomorrow.

“The parties still have to approve everything, sign and finalise the deal, and Musk still has to come up with funds to close it.

”Musk tweeted on Tuesday that buying the company would be an “accelerant” to “creating X, the everything app”, adding the process would be accelerated by up to five years without giving further details.

Follow us on YouTube,Twitter,LinkedIn, and Facebook