Activision Blizzard has agreed to acquire the company behind the popular Candy Crush Saga and Farm Hero games, King Digital Entertainment, for $5.9 billion in cash. King Digital’s games consist of a community of more than 340 million unique users. Activision, of course, is the company behind hit console games like the Call of Duty series.

King Digital closed with a $4.7 billion market capitalization on Monday, meaning Activision is paying a 26 percent premium to acquire the company. That’s less than, however, the price at which King Digital went public last year.

Activision’s motivation to purchase King Digital comes in that it is lagging dramatically in the mobile gaming market. In its second quarter earnings, the company reported that just 5 percent of its net revenue came from mobile gaming, with the rest coming from console gaming, online gaming, and PC gaming. The news of the acquisition comes on the eve of the company’s third quarter earnings report.

King Digital has been working recently to reduce its financial dependence on Candy Crush, but the app still accounts for more than one-third of its total revenues. The company saw the total spending on its titles fall 13 percent year-over-year in the second quarter of 2015.

The $5.9 billion sale is huge for a company that solely relies on digital games. In 2012, OMGPOP, the company behind the popular Draw Something app, was acquired by Facebook for $200 million, only to be shut down 16 months later. It’s also a mind-blowing amount considering Apple purchased Beats for a little over half of that price at $3 billion.