Mehcad Brooks as James, a.k.a. the Guardian
“This is Us” actor Lonnie Chavis will play an alien boy in Season 2, episode 20 of “Supergirl,” which is a pivotal hour for James (Mehcad Brooks), a.k.a. the Guardian. The CW

Lonnie Chavis is guest starring in an upcoming episode of “Supergirl.”

According to TVLine, Chavis — who is best known for his role as young Randall on NBC’s “This is Us” — will play an alien boy named Marcus in Season 2, episode 20 of the CW series. In the episode, titled “City of Lost Children,” Marcus grows close to James (Mehcad Brooks) after the kid’s mother wreaks havoc in National City.

Chavis took to Twitter to confirm his casting. In a tweet, the young actor said that he enjoyed playing Marcus with Brooks, adding that he found the whole cast and crew of the series “very talented.”

READ: Melissa Benoist teases new alliances in remaining Season 2 episodes of “Supergirl”

The episode, which is set to air on May 8, is a pivotal episode for James who finds himself at crossroads as he struggles with his gig as the vigilante, the Guardian.

“There’s a lovely moment that I have with Mehcad, about accepting who you are,” David Harewood, who plays J’onn J’onzz, a.k.a. Martian Manhunter, shared with TVLine. “James is reluctant to step in and help somebody, and I persuade him, as a hero, that sometimes you have to go against your own instincts and do something that’s right, as opposed to what you think might be right.”

When asked if there’s a chance J’onn will recruit James to the DEO, Harewood said: “I really want to see James in the DEO. Winn (Jeremy Jordan) has been a real find in the DEO, so maybe one day we can get James in there, as well.”

The James-centric episode was first revealed by executive producer Andrew Kreisberg to TVLine at PaleyFest last month. “There’s a big James episode coming up that we’re starting to shoot this week,” Kreisberg said at the time. “It’s like the biggest James story we’ve ever done. We’re excited, Mehcad is excited…. It’s going to be great.”

“Supergirl” returns from its month-long hiatus with Season 2, episode 18 on Monday, April 24 at 8 p.m. EDT on The CW.