'The Walking Dead' spoilers: Zombie apocalypse show says goodbye to longtime cast member

Chandler Riggs plays Carl Grimes, whose death on AMC's "The Walking Dead" shocks fans.AMC

The latest episode of AMC's "The Walking Dead" depicts the death of Carl Grimes, one of the longest-running characters on the show to date. The character's death and actor Chandler Riggs's departure from the show came as a surprise not only to fans but to Riggs himself.

Eighteen-year-old Riggs, best known for his role as Carl Grimes, had been in the show since its first season, which premiered when he was 11 years old. He was considered to be one of the mainstays in a series that has seen numerous characters killed off in the course of its post-zombie apocalypse storyline.

The midseason premiere of "The Walking Dead's" eighth season saw Carl's death after a fatal bite from a "walker," the show's moniker for zombies. Characters in the show have survived zombie bites before, but only if they were bitten on body parts that can be amputated to stop the spread of the infection from the bite. However, Carl was bitten on the torso, which meant that amputation would not have saved his life anyway.

Viewers describe Carl's death as devastating, especially since he has been on the show since the beginning. Also, in the show's source material, Carl is still alive and well. However, Carl's demise was unlikely to be a surprise to those who saw the show's previous episode, which came out in December. In that episode, an already-feverish Carl revealed the walker bite on his side to to his father Rick, played by Andrew Lincoln, and Michonne, portrayed by Danai Gurira.

Riggs confirmed his character's death and his exit from the show in a December interview with The Hollywood Reporter. "Yes, Carl is going to die," Riggs said. "There's no way he can get back from that. His story is definitely coming to an end."

In the same interview, Riggs stated that his departure was not his decision, even though it made sense considering the way the story was going.

However, according to Riggs, his own exit from the show came as a surprise, as he did not expect his character to be killed off. The actor had even bought a home near the show's set in Georgia just before he was told that Carl was set to die. He reportedly learned of his character's fate during the rehearsals for the same episode in which his character received the deadly bite from a walker.

The news also came as a shock to Riggs's parents. William Riggs, Chander Riggs's father, stated in a now-deleted Facebook post that "The Walking Dead" showrunner Scott Gimple "fired" his son just two weeks before the actor turned 18. According to the the elder Riggs, the showrunners told his son that they wanted him on the show for the next three years, though they made the decision to kill Carl off shortly afterward.

However, the younger Riggs seemed to harbor no ill-will toward the show. He described shooting for his last episode on the show as "bittersweet", and stated that he was looking forward to moving to LA and focusing on acting.

"The Walking Dead" airs Sundays at 9 p.m. on AMC.