Game of Thrones” is a series that isn’t shy about killing off important characters. However, Gendry actor Joe Dempsie believes he’s cracked the code to having a long life in the world of Westeros.

Dempsie’s character was introduced in Season 1 and remained a regular cast member until Season 3, when he was put in a rowboat and sent off to sea. The character didn’t return until Season 7 when he was revealed to have survived his nautical journey.

Speaking to Fox News at the Season 8 premiere of “Game of Thrones,” the star was thankful to count himself among the rare survivors going into the final episodes.

'GAME OF THRONES' STAR PILOU ASBAEK REVEALS WHY EURON GREYJOY IS UNLIKE ANY OTHER VILLAIN

“I think it was all I ever wanted really. People ask, ‘how would you like your character’s story to end?’ or ‘what would you like for Gendry in the future?’” he said. “I was just like, ‘I just want to be there when this thing comes to its climax. I just want to be around. Ironically enough, three years out of the show... off the show is the safest place to be in ‘Game of Thrones,’ you know? Just don’t be in it for three years, that’s how you avoid death.”

Although a lot took place in the three years that Gendry’s fate was in question, fans never once forgot about him. Viewers far and wide took to Twitter and constantly harangued creators D.B. Weiss and David Benioff to reveal what happened to Gendry.

'Game of Thrones' actor Joe Dempsie revealed his secret to staying alive on the hit HBO drama

'Game of Thrones' actor Joe Dempsie revealed his secret to staying alive on the hit HBO drama (HBO)

“I think it might have had a big hand in me getting my job back,” Dempsie said of the fan outcry. “I remember David and Dan saying to me at the end of Season 3 that Gendry was going to go away for a while, but not to worry. They were going to bring him back they just didn’t quite know when that was going to be yet…. Even that being said, they have so much on their plate. So many different strands of this incredible sprawling story to weave together that it wouldn’t have surprised me if, a few years down the line, they’d just gone, ‘you know what, we just don’t have time for him.’”

'GAME OF THRONES' STAR NIKOLAJ COSTER-WALDAU SAYS NO ONE HAS GUESSED SHOW'S ENDING

While Dempsie is gratified to be back on the immensely popular show, he also credits the writing of the creators and George R.R. Martin with sparking fan’s curiosity.

CLICK HERE TO GET THE FOX NEWS APP

“The thing that I certainly underestimated about this show and how amazing the fans are and how thorough they are when it comes to dissecting it is that, the longer you leave a loose end untied, the more conspicuous it is in ‘Game of Thrones.” It’s not like people just forget about it. If anything, the questions get more intense. So I think they had no choice, they kinda had to [bring Gendry back]. I’ve got to thank Twitter, really.”