Brian J. Smith was OK with getting killed off in the very first episode of “Quantico.” He did it for a friend.

“Quantico” showrunner Josh Saffron asked Smith, who played aspiring chef Max Harding in Saffron’s previous series “Gossip Girl,” to play the role of FBI trainee Eric Packer in the pilot.

“I was like, ‘Hey, sure. A Mormon in FBI training who’s got a really dark secret? This has got me written all over it,’ ” Smith told me earlier this year. (Interview: Brian J. Smith connects with ‘Sense8’ role, story)

ABC’s espionage thriller, about a group of new FBI recruits at the Quantico training center who become suspects in a horrible bombing, debuted Sept. 27 and will air at 9 p.m. Sundays.

The pilot was filmed in April in Atlanta. In it, Smith’s character and his fellow recruits were tasked with learning something private about one other other. Eric was so afraid that his roommate Caleb Haas (Graham Rogers) would expose his affair with an underage girl while he was a missionary in Africa that he killed himself.

Spoiler alert: Eric isn’t the bomber.

“There’s a lot going on with that kid and there’s something about his struggle that felt very personal to me as well,” Smith said, referencing how personal another role, as Chicago cop Will Gorski in Netflix’s “Sense8,” was for him. (Review: “Sense8 a global story worth watching”)

Although Smith’s time on the show was fleeting, the cast and crew treated him like he was a regular cast member. He had a great time, he said.

“It was a really great group of people and I’m so, so unbelievably happy and proud that that show got picked up,” he said.

Smith may be done with the FBI on “Quantico,” but viewers can still see him in “Sense8,” from the Wachowski siblings and J. Michael Straczynski. Season 1 currently is streaming on Netflix and has been picked up for a second season. (News: “Sense8 season 2 is happening”)

Smith said working on “Sense8” and the “Quantico” pilot were completely different experiences.

Many aspects of a network pilot are debated and tested for maximum shine. The stars, including Priyanka Chopra, Jake McLaughlin, Aunjanue Ellis and Josh Hopkins, look good even when their characters shouldn’t.

Not so in “Sense8,” Smith explained.

“To go from ‘Sense8’ where we barely wore makeup—they were like, ‘No, we don’t want to see makeup, we want to see what people’s skin looks like,’ ” he said, “to this really tightly calibrated, calculated show that’s designed to be successful was a little bit disconcerting at first.”