The Captain, Mr. Spock, and Scotty beam down to the surface of the planet Fayo for an official reception. Many citizens are on hand to wish them well, however Kirk suspects that the Emperor Bavoda has turned out the crowd as a show. On the way to the palace, an assassin tries to kill the Enterprise crew with a crossbow, calling them "Friends of Bavoda the Butcher." A palace guard quickly kills the man and apologizes to Kirk. The Captains asks the guard why he didn't simply capture the man - since his weapon was empty after he had fired on them. The guard explains that the "Friends of the Red Raven" attacked from the hills at night, killing women and children. He tells Kirk that they can be shown no mercy! Spock suggests to Kirk that their "routine" visit will not be routine at all. "I share your reservations Mr. Spock!" says the Captain, "We might just have stepped into a hornet's nest!"
At the palace, Emperor Bavoda again apologizes to Kirk. "What malicious fool would be discontent here today?" he asks. "When my father overthrew Riyo-III, there was starvation and misery everywhere! He gave out people food and hope! I have done so as well!" Spock diplomatically tells the Emperor that they are not well informed enough to discuss the politics of his planet. At that moment, the Emperor's son Yano enters the room. He accuses his father of breaking his word by killing the assassin, and tells the Enterprise crew that his father's troops are bloodthirsty, and that his world is oppressed by Bavoda. The Emperor dismisses his son's words lightly, and leads Kirk and the others to a huge banquet in their honor. Later, Bavoda tells Kirk that he wishes for his son to go with the Enterprise and study at Starfleet Academy. Prince Yano is surprised, and asks his father why he was not told of this before.
Once back on the ship, Sulu tells Kirk that Mr. Spock did not beam up with the rest of the landing party! Kirk orders a "tele-scan" of the entire area. They soon pick up an image of Spock, who is being held at knife point by a masked warrior. Spock tells the Captain (how did he know he was being watched?) that he is being held hostage, and that his life will be exchanged for the Prince. The masked warrior gives Kirk three minutes to decide.
While Kirk is deciding, Prince Yano sneaks away to the transporter room and beams himself down to the surface. "No man sacrifices himself for me!" cries the Prince, "I shall confront the Red Raven myself!" The warrior quickly takes Prince Yano away, and Mr. Spock beams back to the Enterprise.
Captain Kirk, Mr. Spock, and Scotty beam back down to Emperor Bavoda's palace to explain the loss of his son to him. "You betrayed me!" yells Bavoda. "You dog!" He slaps Kirk hard across the face. Mr. Scott jumps to Kirk's side, and accuses Bavoda of being at fault as well. "You're not the first tyrant to get hoisted by his own cruelty!" yells Scotty, "If this Red Raven kills your son, your hands will share the blood!" Kirk promptly decks the engineer with a left cross to the face. "You're just going to have to forgive me this one, Scotty!" he mumbles. Emperor Bavoda orders the Enterprise crew to leave his planet, telling them he will file a protest with the Supreme Council of the Federation. Back on the ship, Kirk orders Mr. Scott to take them just beyond the view of the "crude telescopes" of Fayo. "Then the three of us are going back down there", he says, "under cover of darkness. Somewhere on that world is a revolutionary band and a captive Prince! If we're going to avoid a nasty incident between planet Fayo and our Federated Planets, we're going to have to go hunting for a Red Raven!"
A thermal scan of the surrounding jungle locates an area of many campfires. Kirk, Spock, and Scotty beam down to the area to search for the Prince. They are immediately attacked by a band of rebel warriors. They fight back, but are quickly captured. The Enterprise crew is taken to a cell containing Prince Yano. He asks them to speak to his father about granting more freedom to his people. Kirk refuses, citing the prime directive. Prince Yano calls out for the guards to release him, calling himself the Red Raven! The guards quickly arrive, and Yano admits to the landing party that he is really the leader of the rebels. He tells them that he will hold them hostage, since his father would not dare harm such important members of the Federation. The Prince and an band of rebels set out for the city riding large orange ostriches, and take Kirk with them.
Back in their cell, Mr. Spock and Scotty pretend to fight with one another, in order to draw the guards inside the cell. Scotty quickly overpowers the rebels, knocking their heads together. "Just take two aspirins and call me if the pain's not gone by morning!" he says. He and Spock disguise themselves in the guard's clothing, sneak away from the camp, and beam back up to the Enterprise to get weapons.
At the palace, Emperor Bavoda prepares his troops for battle with the rebels, and sets out into the jungle with an army. They come upon Prince Yano and Kirk, and are about to attack them. Kirk rushes forward and tells Bavoda that the leader of the rebels is actually his son! The Emperor believes it is a trick, and orders his troops to attack. Kirk tells Prince Yano that they should retreat. The Prince refuses, and many of his troops are killed in battle with the Emperor. Just as Bavoda and his troops are about to kill them, Spock and Scotty arrive, riding orange ostriches. Spock tosses Kirk a phaser, and they quickly defeat the Emperor's forces.
Later at the palace, Emperor Bavoda abdicates the throne voluntarily. He pronounces his son Yano the new Emperor. Back aboard the Enterprise, Scotty says "Personally, I think once he's had a sniff of power, the Prince will change his tune!" "No!" says Kirk, "I think Yano will remain true to his principles! How about you, Mr. Spock?" "I am sorry gentlemen", Spock says, "I broke my crystal ball yesterday!"