SAN DIEGO >> Normally, anyone in a red shirt who goes on an away mission alongside the bridge crew of the Starship Enterprise isn’t coming back.

The franchise’s propensity for killing off enlisted crew members — typically dressed in the red shirts of security personnel — has led to fans referring to the doomed crewmembers as “red shirts.” (Sci-fi author John Scalzi wrote a comic novel that played off the phenomenon.)

Actor Jason Matthew Smith has played a red shirt in not one, but all three of the modern Star Trek films, and he hasn’t been killed off yet.

Well, that’s not entirely true. Smith’s security officer character Hendorff, who fought young James T. Kirk in a bar fight in the first film before serving under Capt. Kirk aboard the Enterprise, was supposed to be killed off in the sequel, “Into Darkness.” But that filmed scene, in which he was run through by a Klingon weapon, ended up on the cutting-room floor.

And so Smith’s Hendorff returned to the Enterprise for the third movie in the rebooted Star Trek series, “Star Trek Beyond,” which opened this week. And again he was supposed to die. But — spoiler alert — Hendorff lives to see another day, although that was a surprise to Smith.

“I went to the premiere, and all of my scenes were cut out,” Smith said Friday at San Diego Comic-Con. “I was supposed to die at the hands of (Idris Elba’s) Krall in the third one. So this is two movies in a row.”

Producer J.J. Abrams told Smith that, once again, Hendorff had been spared from death because of tweaks to the story during the editing process and said that the red shirt would return for an almost unheard-of fourth time in the next sequel.

Smith is disappointed, but he’s unfazed by having his scenes cut.

“I’m hoping that [being in the films] opens up a lot more [opportunities],” he said. “Obviously, not as much as people seeing my stuff.”

Smith considers himself a “blue collar, working-class actor” and says he makes a living off acting..

“I don’t take it for granted,” Smith said. “Every job is a miracle.”

While he waits for his chance to die again in the fourth Star Trek movie, Smith is working on two productions, one a romantic comedy, and the other an action-comedy being filmed in Morocco next summer that he’s helping produce. Perseverance and creating one’s own opportunities are key to making it in Hollywood, even for non-marquee actors.

“Right now, I feel like I’m in a great place,” Smith said. “I’ve been in it 16 years. I’m not a household name yet — but it’s coming.”