Los Angeles • Remember that time “The Big Bang Theory” almost got killed by a strike?

Probably not. The mega-hit comedy wraps up an incredibly successful 12-season run with its 278th and 279th episodes on Thursday, and it’s been a long time since the show came close to dying after its first eight episodes.

The Writers Guild of America went on strike on Nov. 5, 2007, and television production shut down. “Big Bang” stars thought their show might not come back.

“We were very much on the bubble,” said Johnny Galecki (Leonard). “And when the writers’ strike happened, we thought, ‘Oh, that’s the nail in the coffin.’”

“I was so upset because I loved this show from the start,” said Kaley Cuoco (Penny).

Kunnal Nayyer (Rajesh) said he was “so nervous” about just paying his bills.

“My first paycheck, I went and got a fancy car. And then eight episodes in, the strike happened. And I was like, ‘Oh my God, how am I going to pay for this car?’” he said with a laugh.

Not only has the show became inarguably the biggest hit on TV since then — it’s the longest-running multicamera sitcom in TV history — but Nayyer no longer has to worry about car payments. He and the other four original “Big Bang” cast members — Galecki, Cuoco, Jim Parsons (Sheldon) and Simon Helberg (Howard) — made $1 million an episode for Season 12. Mayim Bialek (Amy) and Melissa Rauch (Bernadette) — who became series regulars in Season 4 — made $425,000 an episode.

But none of them dreamed the show would become a huge TV hit when production was suspended in November 2007.

“Oh, it was terrifying,” said co-creator/executive producer Chuck Lorre. “We didn’t know if we’d get a second season.”

The cast of “The Big Bang Theory” — Kunal Nayyar (second to the left), Johnny Galecki (third from left), Kaley Cuoco (center), Jim Parsons (second from right) and Simon Helberg (foreground, right) — on set with executive producers Bill Prady (far left) and Chuck Lorre (far right). Photo: Sonja Flemming/CBS

What he didn’t expect was that those first eight shows — which CBS repeated “over and over and over again” would “build a following.”

“In a very strange way, those reruns had a chance to find an audience while we were off the air for the strike,” Lorre said.

Still, ratings weren’t great for Season 1 — although network television in general struggled to overcome the effects of the strike, which ended on Feb. 12, 2008. “The Big Bang Theory” was renewed for a second season, but Lorre was still worried — until a trip to San Diego.

“We went to Comic Con after the first season, and I expected about 40 people to show up,” Lorre said. “And there were thousands of people in the room. ... That was the first indication that something was happening that we had never anticipated. I was astonished.”

In Season 2, average viewership rose from about 8 million per episode to about 10 million. By Season 7, it was double that. It’s hard to overstate how successful “BBT” has been — for years, it’s been on the No. 1 comedy on broadcast TV; No. 1 on cable (repeats on TBS); and No. 1 in syndicated reruns on local stations across the country.

Galecki thinks that the unplanned interruption that nearly killed “The Big Bang Theory” made it stronger.

“After those hundred days of the strike, we returned with a newfound excitement and drive,” he said. “Not that we didn’t have that initially, but when something is taken away from you like that — like they say, you don’t know what you’ve got till it’s gone. So we returned with a renewed pride and appreciation for being here. And I don’t think we’ve stopped running with that ball since.”

CBS is keeping the wraps on the last two “Big Bang” episodes. In the first, “The Change Constant” (Thursday, 7 p.m., Channel 2), “Sheldon and Amy await big news.” And in the second, “The Stockholm Syndrome” (7:30 p.m.) “Bernadette and Howard leave their kids for the first time; Penny and Leonard try to keep a secret; Sheldon and Amy stick together; and Koothrappali makes a new friend, as the gang travels together into an uncharted future.”

Could the future include “Big Bang Theory” reunions?

“Maybe,” Nayyar said. “It’s a difficult question to answer now, but I would never be averse to getting the seven of us back together. That chemistry ... is once in a lifetime. So if you get an opportunity to revisit that, why not?”