Social game developer Zynga has entered into an agreement to acquire Small Giant Games, the startup behind the popular mobile game Empires & Puzzles, in a deal expected to total $700 million.

Zynga, which has tumbled since its 2011 Nasdaq initial public offering, will initially acquire 80 percent of Small Giant Games for $560 million, composed of $330 million in cash and $230 million of unregistered Zynga common stock. Zynga will fund part of the transaction with a $200 million credit facility.

“We’ve been impressed by the quality and momentum of Empires & Puzzles as we add another Forever Franchise into Zynga’s portfolio,” Zynga chief executive officer Frank Gibeau said in a statement. “Small Giant has created an innovative game that delivers a unique player experience that engages over the long term.”

The deal is expected to close on January 1. Zynga will purchase the remaining 20 percent of Small Giant over the next three years “at valuations based on specified profitability goals.”

Helsinki-based Small Giant Games had raised $52 million in equity funding from EQT Ventures, Creandum, Spintop Ventures, Profounders and others since it was founded in 2013. The company reported $33 million of revenue for Empires & Puzzles, its most popular game, 10 months after its launch in 2017. Small Giant, which is also behind Alliance Wars and Season 2: Atlantis, says they exceeded 2017’s revenue just four months into 2018.

“Our studio was founded on the idea that small, skillful teams can accomplish giant things, and I am confident that partnering with Zynga is the right next step in our evolution,” Small Giant CEO Timo Soininen said in a statement. “We will now operate as a separate studio within Zynga, maintaining our identity, culture and creative independence. By leveraging the expertise and support from the wider Zynga team, we will amplify the reach of Empires & Puzzles and the new games in our development pipeline.”

Zynga, founded in 2007, is the developer of FarmVille, Zynga Poker, Words with Friends and several other mobile games. The company reported revenues of $248.88 million for the quarter ended September 2018, failing to meet analyst estimates.

Zynga expects to bring in $243 million in revenue in the fourth quarter of 2018.