Warner Bros. Home Entertainment and MGM have bought a stake in Kabam after the duo turned to the free-to-play gamemaker to produce “The Hobbit, Kingdoms of Middle-earth.”

Financial terms of the deal were not disclosed given that San Francisco-based Kabam is a privately held company.

Tsujihara and Gary Barber, MGM chairman and CEO, will join the Kabam board of directors as member and observer, respectively.

“We partnered with Kabam almost a year ago to deliver incredible games for ‘The Hobbit’ trilogy,” said Kevin Tsujihara, president, Warner Bros. Home Entertainment and office of the president, Warner Bros. Entertainment. “As we worked with Kabam, it became clear that a closer, more strategic partnership made sense for us both. Kabam is a leader in the industry and we look forward to being a part of their continued growth.”

The two companies join Google and Intel and venture capital firms Canaan Partners and Redpoint Ventures as investors in Kabam.

In less than one month, “The Hobbit, Kingdoms of Middle-earth” has become the ninth top-grossing mobile app on Google and a top-25 grossing mobile app on Apple in the U.S.

Kabam and WBIE are now co-developing another “Hobbit” game, “The Hobbit: Armies of the Third Age,” to play via web browsers early next year.

Kabam co-founder and CEO Kevin Chou said the studio investment will help the company as it looks to “create new story lines and extensions of Hollywood studios’ intellectual properties for millions of gamers worldwide.”

MGM co-owns rights to “The Hobbit” and owns a vast library of films that include the James Bond franchise.

Founded in 2006, company also is behind “The Godfather: Five Families,” “Dragons of Atlantis,” “Edgeworld,” “Kingdoms of Camelot,” and “Kingdoms of Camelot: Battle for the North.” Its games are available for smartphones, tablets and on websites like Facebook, Yahoo, Google and Kabam.com.