Holy bazinga!

In what is easily a record-setting five-year deal, HBO Max has secured the exclusive domestic streaming rights to The Big Bang Theory. As part of the pact with Warner Bros. Television, the multicamera comedy, created by Chuck Lorre and Bill Prady, has also extended its syndication deal with TBS and will air on the WarnerMedia-owned basic cable network through 2028.

All 12 seasons of the series starring Jim Parsons, Johnny Galecki and Kaley Cuoco will be available to stream for the first time ever on WarnerMedia-backed HBO Max when the direct-to-consumer service launches in the spring. (A formal launch date has not yet been announced.)

Sources estimate that the deal, including both the streaming end and syndication extension, is worth billions of dollars. By comparison, HBO Max paid $425 million over five years ($85 million per year) to move the mega-hit Friends from Netflix and onto its own platform. (Friends, like Big Bang Theory, is produced by Warners.)

"Few shows define a generation and capture mainstream zeitgeist like The Big Bang Theory,” Robert Greenblatt, chairman of WarnerMedia Entertainment and direct-to-consumer, said Tuesday in a statement. "We’re thrilled that HBO Max will be the exclusive streaming home for this comedy juggernaut when we launch in the spring of 2020. This show has been a hit virtually around the globe, it’s one of the biggest shows on broadcast television of the last decade, and the fact that we get to bring it to a streaming platform for the first time in the U.S. is a coup for our new offering."

The market for library content has exploded in the past year as media titans Disney, Comcast and Warners are all set to launch streaming services of their own in a bid to better position their respective companies for the future and compete with Netflix, Amazon and upstart Apple. NBCUniversal, meanwhile, paid $500 million to exclusive domestic streaming rights to The Office. Netflix, after losing both The Office and Friends, on Monday shelled out more than $500 million for exclusive global streaming rights to Sony TV's Seinfeld. (Helping Netflix in that deal was the fact that Sony TV does not have a streaming service of its own.)

The Big Bang Theory wrapped its run in May as television's longest-running multicamera comedy series ever (besting Cheers) and signed off as broadcast's No. 1 scripted half-hour in the all-important adults 18-49 demographic. The comedy, executive produced by Lorre, Prady, Steve Molaro and Steve Holland, launched a larger franchise when its Parsons-produced prequel comedy Young Sheldon connected right out of the gate for CBS. Young Sheldon was renewed for two additional seasons (through its fourth cycle in 2021).

"I am forever grateful to have been part of something as extraordinary as The Big Bang Theory," said Lorre. "All of us — Bill Prady, Steven Molaro, Steve Holland, and the amazing writing staff, cast and crew — recognize that 12 seasons of laughter is a gift to be cherished. And now we are extremely excited that TBBT will be joining the HBO Max lineup and be available to both existing and future fans of the show. Laughter has legs!"

During its run, the nerdy comedy, which co-starred Simon Helberg, Kunal Nayyar, Mayim Bialik and Melissa Rauch, became a global phenomenon. The TBS deal helped expose the show to new viewers, which bolstered viewership for originals on CBS. The stars as well as creators Lorre and Prady and exec producers Molaro and Holland are all said to have ownership points on Big Bang Theory. Lorre, sources say, is the biggest profit participant involved and stands to pocket anywhere from 30 to 40 percent of the staggering new streaming and syndication deal. (Representatives for HBO Max, Warners and Lorre all declined to comment on financial terms of the deal.)

"It’s not every day you get to extend the run of a cultural phenomenon that reaches nearly 35 million viewers on TBS alone every month,” said Kevin Reilly, chief content officer at HBO Max and president of TBS, TNT and truTV. "Through HBO Max and TBS, fans will have access to this beloved comedy for generations to come."

The streaming and syndie deal further lines the pockets of its cast and creative team. At the end of its run, the seven central stars were making north of $1 million per episode plus points of the show's backend on top of producing deals with Warners. Parsons also received co-creator and exec producer fees on Young Sheldon.

The Big Bang Theory earned 55 Emmy nominations and notched 10 wins during its impressive run.

With Big Bang Theory and Friends, HBO Max has two of the most watched and beloved comedies from the past two decades. The SVOD platform will also feature other library titles from HBO's portfolio, including Game of Thrones and The Sopranos, as well as The Fresh Prince of Bel-Air, Pretty Little Liars and new seasons of CW fare including Batwoman and Riverdale spinoff Katy Keene.