"The Big Bang Theory" will end after the upcoming 12th season on CBS.

“We are forever grateful to our fans for their support of 'The Big Bang Theory' during the past twelve seasons," WBTV and Chuck Lorre Productions said in a joint statement.

"We, along with the cast, writers and crew, are extremely appreciative of the show’s success and aim to deliver a final season, and series finale, that will bring 'The Big Bang Theory' to an epic creative close."

When "TBBT" ends in May, it will go out as the longest-running multi-camera comedy in television history with a record-breaking 279 episodes.

It has been a ratings behemoth for CBS, ranking as the No. 1 TV comedy until last season (when ABC's "Roseanne" revival bumped it). "TBBT" also helped launch prequel spinoff "Young Sheldon," which became an instant hit.

A few weeks ago, CBS Entertainment boss Kelly Kahl told reporters there were preliminary discussions about a 13th season. However, that would mean negotiating new deals for the cast.

Last fall, the actors signed lucrative new contracts worth $900,000 each, plus backend points and overall deals. The original five stars —Jim Parsons (Sheldon), Johnny Galecki (Leonard), Kaley Cuoco (Penny), Simon Helberg (Howard) and Kunal Nayyar (Raj) — all took pay cuts so that castmates Mayim Bialik (Amy) and Melissa Rauch (Bernadette) could achieve salary parity.

Sources told The Hollywood Reporter that the decision to continue on after Season 12 likely rested with Emmy-winning star Parsons. If he wanted to return, the rest of the cast would, too.

Season 12 just taped its premiere episode, which means the writers have plenty of time to figure out an endgame for the series.