Warren Buffett, through his investment company Berkshire Hathaway, bought a nearly $1 billion stake in Activision Blizzard in the fourth quarter of last year, just weeks before Microsoft agreed to purchase the video games developer for $75 billion.

A securities filing made late Monday showed that Berkshire Hathaway had purchased a total of 14.7 million shares in Activision worth around $975 million, adding to its multi-billion-dollar portfolio.

The investment in the embattled video games maker, which is known for popular titles such as World of Warcraft and Call of Duty, came as a surprise for most as Berkshire Hathaway had only made minor adjustments to its $705 billion holdings during the quarter last year.

It still remains unclear if the decision to purchase close to a billion dollars worth of Activision Blizzard stock was made by Buffet, his company's chief executive, or his two investment deputies - Todd Combs and Ted Weschler. Nevertheless, the investment was a good decision as Berkshire Hathaway is expected to pocket a sizable profit from the deal.

 Since the start of the year, Activision's stock has surged by more than 23% after news broke that Microsoft was willing to pay a premium to acquire the company in January. This means that the shares Berkshire Hathaway had purchased in the fourth quarter last year would not be worth around $1.2 billion based on Monday's closing price. The securities filing did not say whether Berkshire Hathaway still holds the same stake in the video game maker.

Microsoft's plan to acquire Activision will still need regulatory approval. Microsoft announced its intention to buy Activision Blizzard for $95 per share in mid-January. The news drove Activision's stock up by more than 25% to above $82 per share. The planned acquisition would be the biggest deal ever made by a technology company in the U.S. If the deal goes through, Buffett will likely profit handsomely from Berkshire Hathaway's purchase.

After the California Department of Fair Employment and Housing filed a lawsuit alleging that Activision and its subsidiaries promoted a sexist atmosphere and paid women less than men, the company's stock fell to as low as $56.40 per in the fourth quarter. Microsoft has pledged to implement measures to address Activision's internal management issues.

The stock plunged further after the company announced that it was delaying the release of its highly-anticipated video game titles, Diablo 4 and Overwatch 2. The company's stock also suffered following negative reviews of its recently released title Call of Duty: Vanguard.