CBS has set a megabucks deal with “Judge Judy” star Judith Sheindlin to acquire the complete library rights to her long-running syndicated court show. The deal also extends Sheindlin’s current contract to cover a 25th season of the top-rated gaveler, which is distributed by CBS Television Distribution.

The pricetag for more than 5,200 hours of “Judge Judy” was said to be in the high eight figures but far shy of the $200 million floated when the library was put on the block earlier this year. Lionsgate’s Debmar Mercury syndication unit was also in the hunt in a competitive bidding process that concluded late last week. Lisbeth Barron of Barron International Group spearheaded the deal on behalf of Sheindlin. Scott Koondel, CBS Corp.’s chief licensing officer, led the charge for the Eye.

“Judge Judy Sheindlin is one of the all-time great stars in the history of daytime television. She’s been a part of the CBS family for over two decades and we wanted it to stay that way by acquiring her incredible library of episodes,” said Paul Franklin, president of CBS Television Distribution. “We also want to thank Lisbeth Barron for her diligent work on this agreement. Finally, we’re grateful that Judy has been such an amazing collaborator – allowing us to retain her library so that CTD’s station partners will continue to benefit from this amazingly successful relationship.”

Sheindlin is already TV’s highest-paid personality, pulling down a $47 million annual salary for the show that has ranked as No. 1 in all of syndication for the past eight years. “Judge Judy” generates an estimated $160 million-$170 million a year for CBS in license fees and advertising sales. The show draws an average audience of about 10 million viewers a day — a larger crowd than many primetime series.

CBS granted Sheindlin the library rights to the show as part of her last contract negotiation in 2015. The new deal extends Sheindlin’s contract to host the show through the 2020-21 season, which will mark “Judge Judy’s” 25th year. Sheindlin is also creator and exec producer of the CBS-distributed court show “Hot Bench,” and she has other projects in development with CBS through her Queen Bee Productions banner.

CBS’ interest in securing the rights reflects the booming market for high-wattage content. Until just a few years ago, unscripted daytime shows were seen has having little to no backend value, given their topicality. But “Judge Judy” has proven to repeat extremely well during its summer hiatus weeks. The enormous library of episodes and the show’s enduring format — Sheindlin’s bon mots from the bench are timeless — is sure to be sought after by a streaming service or cable network. CBS might also hang on to the rights to feed its growing platform of OTT services.

“I’m overjoyed that CBS will continue to shepherd my program and be the custodian of the library,” Sheindlin said. “They are the gold standard in television, and I’m fortunate to be in business with such talented people.”

“Judge Judy” was birthed by Big Ticket Television, then a unit of Spelling Television, in the fall of 1996. The show was a sleeper syndie hit from the start. It was such a cash cow after a few years in syndication it became a big driver of Paramount Pictures’ buyout of Spelling Entertainment Group in 1999. CBS inherited “Judge Judy” as part of its 2006 separation from Viacom.