The Enterprise encounters some glowing asteroids and invetigates. Upon orbiting an asteroid, they find they cannot escape orbit. Kirk and co. beam down to look around, and meet a group of aliens who claim to be the stranded crew of a cargo ship. In fact, they are prisoners, condemned to execution--to be killed when the asteroid eventually destroys itself. The criminals hold Kirk and co. hostage, but Spock effects a rescue, and they leave the criminals to their fate. Spock declares: "Execution by asteroid is the way of their society! We had no other choice but to leave them, captain!
Also, some casual sexism in a page of jokes:
We will see aliens trapped on a prison planet lying about their status and trying to escape in TNG's Power Play.