Disney is parting ways with Netflix.

The company said Tuesday that it will end its partnership with the streaming service in 2019.

Disney also announced it will launch its own streaming services, and plans to acquire a majority stake in BAMTech, a major streaming and marketing service.

Disney's cable networks, such as ESPN, make up the majority of the company's earnings. However, that proportion has fallen in recent years as viewers change the way they consume entertainment. The new streaming services are a way to connect directly with consumers and take advantage of new viewing habits.

To that end, Disney is paying $1.58 billion for majority ownership of BAMTech.

Related: Netflix buys comics publisher behind Kick-Ass and Kingsman

Last August, Disney acquired a 33% stake in that company, which is a spinoff from Major League Baseball Advanced Media, for $1 billion.

Disney said it will launch an ESPN-branded streaming service in 2018, and a separate Disney-branded streaming service in 2019.

The Disney service will be the only place where U.S. viewers can watch new live action and animated movies from Disney and Pixar, including "Toy Story 4," the "Frozen" sequel and "The Lion King" live-action movie. It will also feature content from the Disney Channel, Disney Junior and Disney XD.

The ESPN-branded sports service will offer about 10,000 events a year, including live programming with regional, national and international games.

Related: Netflix snags new David Letterman series

Disney's plans for its own streaming services come as ESPN has struggled with a drop in subscribers and ad revenue as well as a round of high-profile layoffs and departures at ESPN earlier this year and in 2016.

According to a spokesperson, Marvel TV series like "Luke Cage," "Jessica Jones" and "The Punisher" will continue to live on Netflix -- for now. Animated series like "The Clone Wars" will move to the Disney app. Existing movies from Disney and Pixar will remain on Netflix until their current deals expire.

Shares of Netflix (NFLX) slipped 2% in early trading, while Disney (DIS) shares fell 5%.