Zynga founder Mark Pincus is rejoining the gaming company as CEO effective immediately, replacing Don Mattrick, who led Zynga for less than two years.

The executive shuffle comes after the company struggled in recent years to maintain its early growth rate. It hired Mattrick in 2013 to help restore Zynga's business and expand its user base.

Zynga, founded in 2007, found success in its early years with games like "FarmVille" and "Zynga Poker." It won early success publishing its games through Facebook but has since shifted focus to mobile versions. The company makes its money primarily through advertising and through users' purchases of virtual goods.

James Niccolai/IDG News Service

Zynga founder Mark Pincus, pictured at the company's San Francisco office in 2011.

Zynga reported a net loss of US$45 million in the fourth quarter of 2014. In 2013 it laid off more than 500 employees, or 18 percent of its workforce.

Pincus's return is surprising, because he led the company during its downturn as well as in its heady early days. Pincus recently started his own startup incubator, Superlabs.

"It's time to renew our focus on our vision to make play and social games a mass market activity," Pincus said in a statement Wednesday on Zynga's site.

Pincus signaled he may double down on the company's mobile offerings, praising in particular Zynga's acquisition of "Clumsy Ninja" developer NaturalMotion.