Giancarlo Esposito had a feeling his time on “Breaking Bad” was nearing an end while filming the fourth-season premiere.

In “Box Cutter,” Esposito saw his quiet, contemplative drug kingpin Gustavo “Gus” Fring slit a subordinate’s throat. And he know his own character’s life might be cutting short too.

When the AMC series creator Vince Gilligan called Esposito to his office for a conversation, the actor was not surprised. But he didn’t make it easy.

“Don’t do that,” Esposito said in his best Gus voice as Gilligan went to close the door. “He laughed uncomfortably. He had a quizzical look on his face as I gave him the full-on Gus treatment.”

Eventually, the door was closed and the expected news was delivered.

“It’s like a Western: The town is too small for both of us and something has to give,” Esposito says. “I was really pleased with the idea the writers came up with. It was very carefully done and meticulous and people raved.”

Gus Fring met his maker in the season finale when a bomb exploded, ripping half of his face off, leaving Gus just enough energy to straighten his tie — a classic Gus gesture — before collapsing in a heap.

“I was very happy with the end result,” says Esposito, who stars in NBC’s “Revolution” this fall. “I had some nervousness about whether it would be believable and really work, but it did due to the smart writing, wonderful filmmaking and incredible work done by the special effects artists. It all came together.”