Facebook will sell its core business to Microsoft, which will own and operate the social network, in a $1.4 billion deal, sources familiar with the matter told CBS News.

The sale is expected to close in the first half of 2018, with Facebook potentially becoming the largest technology company in the world by market value.

The deal includes a combination of cash and equity financing, as well as a number of strategic transactions.

Facebook will receive a 49.9 percent stake in the company, which also will own the business that will be acquired, the sources said.

The buyout is expected by some analysts to be the biggest acquisition of a technology company this century.

It will also mark the first major consolidation of Facebook’s core business in more than two decades.

The company had a $17 billion cash pile at the end of 2016, which grew to $30 billion at the beginning of this year.

The company has been on a losing streak, however, and was down 7 percent at $23.06 a share on the day of the deal announcement.

In March, Facebook CEO Mark Zuckerberg announced plans to close the company’s remaining non-core businesses, including the popular Messenger and Instagram.

He also announced a $250 million fund to invest in startups that are making breakthrough innovations in artificial intelligence.