What happened

Shares of Twitter (TWTR) soared today after Elon Musk finally agreed to buy the social media company for $44 billion, the original price he offered several months ago. The Tesla CEO's decision appears to conclude several months of legal wrangling as Musk had sought to get out of the deal by claiming, among other things, that bots were inflating Twitter's user base.

The stock popped shortly after noon when Bloomberg broke news of the deal. Twitter finished the day up 22.2% at $52 a share, 4% below the originally negotiated buyout price of $54.20.

So what

Seemingly to avoid an upcoming deposition and a court battle, Musk sent a letter to Twitter Monday night saying he intended to close the transaction as the two parties had initially agreed to back in April.

Twitter said in response that the company intends to close the deal with Musk at a price of $54.20 a share. The news seems to bring a monthslong saga to a close, though the fact that Twitter is still trading at a discount to the buyout offer indicates some skepticism among investors that the deal will close.

A deal could be completed as soon as this Friday.

Now what

A buyout seems to be the best option for Twitter shareholders because the social media platform never really fulfilled its potential as a business. User growth has stalled, and its advertising never developed the kind of targeting and value to small business that Facebook's did.

It's unclear where the company will go in Musk's hands, but he's likely to take risks with it that the current management otherwise wouldn't. 

The deal hasn't officially closed. Given that Musk seems to have been backed into a corner, it makes sense for him to finally go through with the purchase.