"Drake & Josh" fans never expected to see Josh Peck on "The Last of Us," but he made a surprise appearance.

The actor, 38, unexpectedly appeared in a small but significant role in the opening scene of the latest episode of the HBO series, which aired on May 4.

In an opening flashback sequence, Peck portrayed a FEDRA soldier who shares a graphic story with his comrades. The scene takes a turn when the sergeant, Isaac Dixon (Jeffrey Wright), confronts Peck's character for his lack of sensitivity.
However, fans expecting Peck to become a regular on the series were surprised when Isaac betrays and kills the soldiers, including Peck's character, before defecting to the Washington Liberation Front. This scene provides background for Isaac, who later becomes the leader of the WLF.
Peck's role in "The Last of Us" was kept under wraps by HBO until the episode aired.
On Instagram, Peck shared behind-the-scenes photos from the set and mentioned that it was challenging to keep the role a secret.
"It was an honor to be part of one of my favorite shows, working with one of my favorite actors," Peck wrote, referring to Wright.
In an interview with Entertainment Weekly, the episode's director, Kate Herron, likened Peck's sudden demise to Drew Barrymore's unexpected death in the beginning of "Scream."
"We had other actors audition for the part," Herron told EW. "But when Josh read for it, we knew we had to have him. The idea of surprising viewers with just Josh... I loved the twist, like we did with Drew Barrymore in 'Scream.'"
Peck is best known for his roles in Nickelodeon shows like "The Amanda Show" and "Drake & Josh." He has also appeared in Christopher Nolan's "Oppenheimer" and "How I Met Your Father," a spin-off of "How I Met Your Mother. Peck currently hosts the podcast "Good Guys," where he recently reunited with former co-star Drake Bell.
The latest episode of "The Last of Us" introduced viewers to Isaac, a pivotal character from the video game that inspired the HBO series. Wright also voiced Isaac in the game.