Code of Honor (Star Trek: The Next Generation)

"Code of Honor" is the fourth episode of the first season of the American science fiction television series Star Trek: The Next Generation, originally aired on October 12, 1987, in broadcast syndication. The episode was written by Katharyn Powers and Michael Baron and was directed by Russ Mayberry. Mayberry was replaced part way through the filming of the episode with first assistant director Les Landau.

Set in the 24th century, the series follows the adventures of the Starfleet crew of the Federation starship Enterprise-D. In this episode, while the ship is visiting the planet Ligon II to retrieve a vaccine, crewman Tasha Yar (Denise Crosby) is abducted by the leader of the Ligonians. The race abides by a strict code of honor and their leader seeks to use Yar as a pawn to increase his power.

Powers and Baron pitched a story based on a reptilian race following a code of honor similar to the bushido code of the Samurai. This was developed into the final story, which was described as having a "1940s tribal Africa" theme by staff writer Tracy Tormé. The episode was received negatively amongst cast, crew, fans, and reviewers, and has been called "quite possibly the worst piece of Star Trek ever made".

Plot
The Enterprise arrives at the planet Ligon II to acquire a vaccine needed to combat an outbreak of Anchilles fever on Styris IV. The crew, possessing little information on the Ligonian culture, finds that it follows strict customs of status similar to ancient China. Specifically, while the men in their culture rule society, the land itself is controlled by the women. Lutan (Jessie Lawrence Ferguson), the Ligonian leader, transports up to the Enterprise to provide a sample of the vaccine, and is impressed by Lt. Tasha Yar's status as head of security. Yar further demonstrates her aikido skills against a holographic opponent for Lutan on the holodeck. After a tour of the ship, Lutan and the Ligonians abduct Yar as they transport back to the surface. Captain Jean-Luc Picard (Patrick Stewart) demands that Lutan return Yar, considering the kidnapping an act of war, but receives no response from the planet. After consultation with his officers, Picard determines that Lutan took Yar in a "counting coup" as a show of heroism. Picard contacts Lutan in a more peaceful manner, who grants permission for the Enterprise crew to beam down to the planet and promises to return Yar after a banquet in his honor.

Lutan announces at the banquet that he wishes to make Yar his "first one", surprising not only the Enterprise crew but also Yareena (Karole Selmon), who was already Lutan's "first one." Yareena challenges Yar to a fight to the death to claim back the position. When Picard objects to the fight, Lutan refuses to give the Enterprise the rest of the vaccine unless Yar participates. The crewmembers investigate the combat ritual and find that the weapons used are coated with a lethal poison and that it is Yareena's wealth to which Lutan owes his position. Picard prepares to have Yar beamed to the Enterprise should she be harmed in the battle. As the match progresses, both Yareena and Yar are equally skilled, but Yar eventually lands a strike on Yareena. Yar quickly covers Yareena and orders the transport of both of them to the Enterprise against the demands of Lutan. Aboard the ship, Dr. Beverly Crusher (Gates McFadden) reaches Yareena moments after death, but is able to counteract the poison and revive the woman's body. When Lutan demands to know the fate of Yareena, Crusher reveals that Yareena died, thus ceding the match to Yar and breaking the "first one" bond. Yareena is now free to select a new mate; she chooses Hagon (James Louis Watkins), one of Lutan's bodyguards, effectively stripping Lutan of his position of power and making him her "second one". Hagon lets Yar go and gives the Enterprise their full supply of vaccine.

Production
Writer Katharyn Powers was invited to pitch a story for The Next Generation as she was friends with Star Trek writer D. C. Fontana. Alongside her writing partner Michael Baron, Powers pitched a story involving a reptilian race called the "Tellisians" who followed a code of honor similar to that of the samurai. However, the script and the aliens went through several changes before making it to the screen. Powers would go on to write the Season 1 episode "Emancipation" for Stargate SG-1, which held similar themes to "Code of Honor". The African theme of the episode was brought in by director Russ Mayberry, who had the Ligonians race cast entirely from African-American actors. Mayberry was fired during production by the show's creator Gene Roddenberry, and First Assistant Director Les Landau completed the episode. Star Trek novel author Keith DeCandido later recalled that this was because of the casting itself, while cast member Wil Wheaton (Wesley Crusher) thought that it was because Mayberry was racist towards the guest stars after they were cast.

Staff writer Tracy Tormé was not pleased with the "1940s tribal Africa" theme of the aliens, and because the combat scene towards the end of the episode resembled the Kirk versus Spock fight in The Original Series episode "Amok Time". Fellow Star Trek writer Maurice Hurley said that it was "a good idea, but the execution just fell apart. Again, if you take that script and if the actors had been told to give it a different twist, that show would have been different. But it became too baroque and fell apart. But the concept of having a guy say 'I have to have somebody kill my wife and this is the person' is a good idea." Some of the cast, including Jonathan Frakes, sought to prevent the episode from being re-aired. Michael Dorn wished they had not done the episode, and was glad he was not in it. In a 2012 interview, Patrick Stewart agreed with fans that considered the season 2 episode "The Measure of a Man" to be "the first truly great episode of the series", stating that the first season "had several quite weak episodes". Referring to "Code of Honor" in particular he said, "I can think of one very early on that involved a race of black aliens that we all felt quite embarrassed about."

The episode also saw the first appearance of the black and yellow grid structure of the empty holodeck. However, the interface unit used by Yar, which resembled a corded phone, was not seen again, with crew members using vocal commands to program the holodeck in future episodes. Captain Picard showed pride in his French heritage in this episode. This character quirk was rarely repeated, such as in the following episode "The Last Outpost", and by singing "Frère Jacques" in "Disaster" while escaping a turboshaft with three children.

Reception
"Code of Honor" aired in broadcast syndication during the week commencing October 12, 1987. It received Nielsen ratings of 9.5, reflecting the percentage of all households watching the episode during its timeslot. This was lower than ratings received by the two episodes preceding it, but higher than the 8.9 received by the following episode, "The Last Outpost".

Several reviewers re-watched the episode following the end of the series. Cast member Wil Wheaton reviewed it in April 2008 for AOL TV. He could not remember actually appearing in the episode, and it was the first time since it was originally broadcast that he had seen it. He said that it was not good, but that it was "not as overtly racist as I recalled. I mean, it's certainly not as racist as 'Angel One' is sexist, and if the Ligonians hadn't been arbitrarily determined to be entirely African American, it wouldn't have even been an issue." He said that the episode is an example of the type of episodes in the first season that would have resulted in the show being cancelled mid-season if it hadn't been so well supported by the fans and run directly into syndication. James Hunt, writing for Den of Geek, asserted that the episode was racist. He said that "this isn't just bad television, it's openly offensive, and it seems to do its best effort to undo some of the most important lessons the original series imparted some 25 years after we're supposed to have learned them." Overall, he said that this was "quite possibly the worst piece of Star Trek ever made".

Zack Handlen reviewed the episode for The A.V. Club in April 2010. He said that the aliens in the episode were "one note", and overall "Code of Honor" did not generate any emotional investment. He gave the episode a score of C−, summing it up by saying, "I'm not sure I'd believe a great show could come out of TNG after watching 'Code', but I could at least say it had promise without sounding like a complete tool." Keith DeCandido watched "Code of Honor" for Tor.com in May 2011. He thought the episode was riddled with clichés, and says that the episode only seems racist because of the casting even though the script did not call for it. "If the Ligonians had been played by white people, none of the dialogue would change, and nobody would call it racist", he said and gave it a score of two out of ten. Michelle Erica Green of TrekNation thought the episode was very slowly paced, and that the fight scene at the end was "clunky and awkward", suggesting that this had something to do with the opposition of the cast and crew to the episode overall. However, she did note a redeeming quality of the episode, citing the scene in which Geordi La Forge tries to explain humor to Data.

Jamahl Epsicokhan on his website Jammer's Reviews, gave the episode half a star out of four, describing it as "absolutely terrible". He thought that it represented a story closer to that of The Original Series saying, "It employs every cliche in the TOS rulebook, including goofy alien customs, a hand-to-hand fight to the death, clever captain trickery, and silly gender roles played stupidly. The fight to the death is particularly inept; stunt sequences have rarely looked so cheesy. One of Trek's worst episodes."

In 2016, fans at the 50th anniversary Star Trek convention voted "Code of Honor" as the 2nd worst episode of any Star Trek series, behind only Star Trek: Enterprise series finale "These Are the Voyages...".

In 2017, Screen Rant ranked "Code of Honor" the second worst episode of the Star Trek franchise.

Home media release
The first home media release of "Code of Honor" was on VHS cassette was on September 5, 1991, in the United States and Canada. The episode was later included on the Star Trek: The Next Generation season one DVD box set, released in March 2002, and was released as part of the season one Blu-ray set on July 24, 2012.

Episodes from "Encounter at Farpoint" to "Datalore" were released in Japan on LaserDisc on June 10, 1995, as part of First Season Part.1. This included the first-season episode "Code of Honor", and the set has a total runtime of 638 minutes across multiple 12-inch optical video discs.