New York CNN Business  — 

Zynga, the mobile game developer known for hits like FarmVille, Words With Friends and a popular Texas Hold’em poker game, is pairing up with Take-Two Interactive, the developer of the Grand Theft Auto franchise of games.

Take-Two said Monday it is buying Zynga in a cash-and-stock deal valued at $12.7 billion, including debt. The deal values Zynga at $9.86 a share.

Shares of Zynga (ZNGA) soared more than 40% on the news in late afternoon trading, while Take-Two (TTWO) sank almost 15%.

The deal gives Take-Two a bigger presence in the lucrative world of mobile gaming, expanding its business beyond the console and PC games it is mainly known for, including NBA 2K, Red Dead Redemption and the GTA series.

“We are thrilled to announce our transformative transaction with Zynga, which significantly diversifies our business and establishes our leadership position in mobile, the fastest growing segment of the interactive entertainment industry,” said Strauss Zelnick, Take-Two’s chairman and CEO, in a statement.

For Zynga, the takeover gives the company a deeper pocketed parent in the gaming business that can help it grow.

Zynga went public in 2011 at $10 a share, but the stock has languished since then. That’s partly due to the fickle nature of the mobile gaming business — a decade later, it’s Roblox that’s all the rage.

But it’s also because Facebook (FB) (now known as Meta Platforms) and Zynga inked a new business deal in 2012 that lessened Zynga’s reliance on Facebook (FB) for revenue. That hurt Zynga.

Zynga hopes the merger with Take-Two will lead to more growth opportunities.

“Combining Zynga’s expertise in mobile and next-generation platforms with Take-Two’s best-in-class capabilities and intellectual property will enable us to further advance our mission to connect the world through games while achieving significant growth,” said Zynga CEO Frank Gibeau in a statement.

The combined Zynga/Take-Two should be able to compete more effectively with red-hot Roblox, whose stock has soared since the company listed shares directly on the New York Stock Exchange last year.

Take-Two also competes with Electronic Arts (EA) and Activision Blizzard (ATVI) in the market for games for the popular Nintendo (NTDOF) Switch, Microsoft (MSFT) Xbox and Sony PlayStation consoles.