MGM agreed to pay $1.03 billion to buy full ownership of EPIX on Wednesday, betting that the "TV Everywhere" pioneer will help it grow.

Metro-Goldwyn-Mayer, or MGM, is buying EPIX from Viacom and Lionsgate, who together owned more than 80 percent of the premium service. MGM — the company behind series like "Fargo" and "The Handmaid's Tale" — will now get access to EPIX's paid TV content like "Berlin Station," a secret-agent show starring Richard Armitage.

The deal builds on MGM's swelling stake in United Artists Media Group, which spawned from the Charlie Chaplain's early 1900s studio.

Edgy, unique serial content has become a point of competition as more TV viewership moves online, with brands like Netflix and Amazon throwing cash at new series that rival those at HBO.

For MGM, EPIX means a new stream of revenue, and for EPIX, the deal means a focused ownership away from the tumult that has faced Viacom and Paramount Pictures over years past.

"EPIX is well positioned to capitalize on the evolving patterns of content consumption in a dynamic distribution landscape," Gary Barber, chairman and CEO of MGM, said in a statement.

EPIX CEO Mark Greenberg added: "The Lionsgate and Viacom priorities have evolved in recent months, and now is the right time for them to capitalize on their initial investment and focus their attention on their other businesses."