Fox’s “Gotham” has announced that another famous comicbook character is joining the Batman prequel.

Nicholas D’Agosto (“Masters of Sex”) is joining the cast as Harvey Dent — a character who, during his good days, is known for being an idealistic assistant district attorney who vows to eradicate the crime and corruption that has poisoned Gotham. Although he will one day serve as the white knight Gotham desperately needs, Dent also gives the audience a fleeting glimpse of the villain he will become: Two-Face.

D’Agosto will only serve as a guest star on the series for now, as “Gotham” is currently spending the first season’s villain storyline on an origin tale surrounding Oswald Cobblepot/Penguin (actor Robin Lord Taylor). But there is a series regular option in the event that the show is renewed for a second season.

Right now, the chances of that happening look good. The second episode of “Gotham,” which airs Mondays and is produced by Warner Bros. TV and is based on the DC Entertainment characters, delivered solid ratings earlier this week. The premiere episode also topped piracy downloads. In a potentially bold move, Netflix bought worldwide distribution rights to the series’ first season in September — a deal that was announced even before the show had a chance to premiere.

D’Agosto is repped by UTA, Emerald Talent Group and Mitch Smelkinson.