In one of the biggest television-syndication deals in history, “The Simpsons” will finally be moving to cable television; not too surprisingly, the longest-running family show in TV history is staying in the family.

That’s the 21st Century Fox family, which owns the studio that created “The Simpsons,” (20th Century Fox Television); the network that broadcasts it (Fox); and now the cable network, FXX, that has acquired both cable and streaming rights to the more than 550 episodes.

Terms of the agreement were not disclosed, but a representative of one of the other companies that pursued the package said the bidding was highly competitive and estimated the per-episode figured reached $1.5 million to $1.6 million. That would put the value of the deal at close to $900 million.

The 24 seasons of shows that have been completed will begin airing in August 2014. The 25th season, now in production, will be available the month after.

The rights include the exclusive exposure on the FXX cable network, the new comedy offshoot of the FX Network, and video-on-demand and streaming rights. By locking up these platforms, FXX can control the way it uses them, while keeping the shows away from competitors.

The shows will be streamed online by FXNOW, a mobile viewing app that FX Networks plans to introduce soon.

Other companies that most likely would have been interested in the Simpsons package include Turner Broadcasting, on behalf of two of its cable networks: TBS and Adult Swim. Viacom and NBC Universal were also widely mentioned as potential bidders.

When Gary Newman, chief executive of 20th Century Fox Television, announced the prospective cable sale in September, he called the show “the greatest television asset of all time,” emphasizing that “The Simpsons” could run as a nightly entry on a cable network and not have to repeat an episode for more than a year.

For two decades, repeats of “The Simpsons” have been widely seen on local broadcast television stations. But every other sitcom hit of recent vintage, from “Seinfeld” to “The Big Bang Theory,” has been made available in multiple sales to broadcasters and cable networks.

But “The Simpsons” was locked into a unique — and now vintage — deal. The show was first sold into syndication in 1993. While an enormous hit for Fox, “The Simpsons” always stood out because it was animated. When Fox tried to place live-action comedies adjacent to it, they never worked.

The stations that were asked to pay hefty fees for the rerun rights were concerned about how well the show would fare on their lineups, a single animated show among what were usually repeats of live-action comedies.

So the stations insisted on maintaining exclusivity, meaning no sale to a cable network for as long as they were buying new seasons of reruns. “The Simpsons” — with a cast that never visibly aged — kept making new episodes on Fox, and the syndication contracts kept going.

Until now. The studio has finally worked out a way to open the cable window, one that has long been estimated to be worth a fortune to a show that already is one of the greatest moneymakers in entertainment history, considering the value that has been reaped from merchandising, a theme-park attraction and a movie.

For the fledgling FXX network, the deal is intended to be a foundation stone. FX, known mainly for well-regarded dramas such as “The Shield,” “Nip/Tuck,” “Justified” and “Sons of Anarchy,” spun off its comedy lineup (“Louie,” “It’s Always Sunny in Philadelphia”) in an all-comedy network starting last September.

The results have been lackluster. Ratings for shows that have moved from FX to FXX have been nothing close to what they were in the past. In the most prominent example, the late-night talk show “Totally Biased With W. Kamau Bell” had more than 300,000 viewers on FX but fell to fewer than 50,000 on FXX and was canceled this week.

Now FX will have a core of comedy programming with the longest track record in television history.

Paying the hefty price has less sting because the money essentially moves from one corporate pocket to another, minus the many millions that will be paid to the profit participants in the show, which include, among many others, Matt Groening, who created the original comic characters, and James Brooks, who brought the show to Fox 25 years ago.