“The Office" veteran Rainn Wilson has joined the cast “Star Trek: Discovery” as the iconic Original Series character Harcourt Fenton Mudd.

RELATED: Star Trek: Discovery Casts Its Captain

Originally played by Roger C. Carmel, Mudd is one of the most beloved characters in the “Star Trek” universe. The playful conman was the only non-crew member featured in more than one episode of the original series, appearing in the Season One episode “Mudd’s Women” (originally aired on Oct. 13, 1966), and then in Season Two's “I, Mudd” (Nov. 3, 1967). Carmel reprised the role in 1973, voicing the character on the “Star Trek: The Animated Series" episode “Mudd’s Passion."

Although Mudd was conceived by “Star Trek” creator Gene Roddenberry, all three Mudd episodes (including the cartoon version) were scripted by Stephen Kandel, a veteran TV writer whose genre credits also include the 1960s “Batman” series, the 1970s “Wonder Woman," “Mission: Impossible,” “The Six Million Dollar Man,” “The Bionic Woman” and “MacGyver.”

RELATED: Star Trek TOS: 15 Enterprise Crew Members You Forgot Existed

Set about a decade before the events of the original series, "Star Trek: Discovery" stars Sonequa Martin-Green, Terry Serpico, Maulik Pancholy, Sam Vartholomeos, James Frain, Doug Jones, Michelle Yeoh, Anthony Rapp, Chris Obi, Shazad Latif, Mary Chieffo, Jason Isaacs and Mary Wiseman.

Produced by CBS Television, the 13-episode first season will debut on CBS before moving to the network's CBS All Access online streaming subscription service.