(Bloomberg) — Elon Musk said his xAI artificial intelligence startup has acquired the X platform, which he also controls, at a valuation of $33 billion, marking a surprise twist for the social network formerly known as Twitter.

Most Read from Bloomberg

“The combination values xAI at $80 billion and X at $33 billion,” the billionaire wrote Friday in a post on X. The value of X is $45 billion when including $12 billion of debt, he said, describing the purchase as an all-stock transaction.

The deal gives the new combined entity, called XAI Holdings, a value of more than $100 billion, not including the debt, according to a person familiar with the arrangement, who asked not to be identified because the terms weren’t public. Morgan Stanley was the sole banker on the deal, representing both sides, other people said.

For Musk, the deal streamlines his businesses and solidifies the relationship between the former Twitter and xAI, which has used information from the social network to hone its chatbot. The deal also offers a resolution to X’s other backers following months of uncertainty over the state of their investment as Musk’s changes led to an exodus of users and advertisers.

“XAI and X’s futures are intertwined,” Musk posted. “Today, we officially take the step to combine the data, models, compute, distribution and talent. This combination will unlock immense potential by blending xAI’s advanced AI capability and expertise with X’s massive reach.”

Musk, the world’s richest person, acquired Twitter for $44 billion in late 2022, a transaction that included debt. After taking control of the platform, he quickly moved to cut costs by slashing thousands of jobs, closing offices and renegotiating contracts. He also tried to make Twitter more aligned with what he calls “free speech absolutism” by eliminating certain content restrictions and allowing some banned accounts to return.

But Musk also eroded a significant portion of the network’s advertising business in the process. Marketers fled the site for fear that their promoted posts would appear alongside unsavory content from users. Even with an expected boost in sales for 2025, X’s advertising business is still projected to be roughly half of what it was when Musk acquired the company.