The TARDIS lands in pre-conquistador Mexico inside a tomb as the crew go outside they examine the area. The Doctor’s grandchild Susan comments on the barbarism of the Aztecs but Barbara while putting on a bracelet counters:
BARBARA: Oh, that was only one side to their nature. The other side was highly civilized.
SUSAN: The Spanish didn’t think so.
BARBARA: They only saw the acts of sacrifice. That was the tragedy of the Aztecs. The whole civilization was completely destroyed, the good as well as the evil.
as Susan returns to the TARDIS to get the others a section of the wall opens and Barbara goes through it. The Aztec high priest of knowledge Autloc sees her and orders her seized until they spot the bracelet. When the other come through the door looking for her they are shocked to discover that Barbara is thought to be the reincarnation of the priest Yetaxa, but also discover there is no way to open the door from their side of the wall to the sealed tomb.
The Doctor takes advantage convincing Autloc and the priest of sacrifice Tlotoxl to let them mingle with the people in the hopes of finding a way back through the temple to the TARDIS meanwhile Barbara is scheduled by the priests to appear at a ceremony to the Aztec rain god.
When the Doctor discovers a human sacrifice is to be made at the ceremony he quickly goes to Barbara to warn her not to interfere but Barbara, having none of it, decides to use her place as a God to stop human sacrifice once and for all. Things don’t quite work out as planned:
BARBARA: Stop. I, Yetaxa, command you. There shall be no more blood split.
MAN: You have denied me honour.
TLOTOXL: Honour us then with your death.
(the man jumps off the platform to his death)
This brings her under the suspicion of Tlotoxl who deems her a false goddess.. He demands the punishment of Susan who cried out at the impending sacrifice. Autloc backs Barbara (Yetaxa) that Susan be instead schooled in proper Aztec ways. When alone the Doctor scolds Barbara and suggests she play Autloc who still has faith in her off of Tlotoxl while he continues to look for a way back in the temple.
While Tlotoxl hatches plots to destroy or discredit Barbara and the “servants of Yetaxa” who he sees as rivals to his power, Autloc already impressed by Susan’s intelligence, speaks to Barbara. She again tries to convince him that Human Sacrifice must end:
BARBARA: Were you not angry when I forbade the sacrifice to the Rain God?
BARBARA: Do you question the value of such sacrifice?
AUTLOC: I accepted it. But we send messengers to the gods, why should the gods not send a messenger to us?
BARBARA: To say there shall be no more human sacrifice?
AUTLOC: I shall not oppose the gods if it is their will that such sacrifices cease.
BARBARA: The High Priest of Knowledge speaks with great wisdom.
AUTLOC: If your words are denied, shall we not be living in defiance of the gods?
The Doctor befriends a woman Cameca who introduces him to the builder of the temple’s son Ixta, who unknown to the Doctor, has become Ian’s rival for command of the Aztec armies. In exchange for aid to defeat “an enemy” (Ian) in combat The Doctor gains Ixta’s promise to see the temple plans
Meanwhile things continue to go poorly for Barbara as she has to overrule Aztec law to save the Doctor from punishment for violating an Aztec law while needing to resort to a knife to Tlotoxl throat to foil his and Ixta’s scheme to slay Ian when the Doctors slow acting drug takes effect. That public embarrassment goes over poorly and continues to put Autloc, who still backs Barbara on the spot:
BARBARA: There’s to be an eclipse. And Tlotoxl will offer human blood so that the sun will shine again.
BARBARA: But it’s a trick! As the High Priest of Knowledge, you know the sun will shine again.
AUTLOC: Unless the gods withdraw their favour from us.
BARBARA: Am I not a god? Support me. Tlotoxl won’t dare defy us both.
AUTLOC: If I take that course, there is no way back for me. In all humility, I beg you, do not deceive me or prove false to me.
After Ian overhears Tlotoxl conspiring with a 3rd priest Tonla to harm Barbara he goes to warn with her:
BARBARA: I’ll watch them both. Tlotoxl’s dangerous. He seems able to bring people around to his way of thinking.
IAN: You’ve got it all wrong, Barbara. All the people here share Tlotoxl’s views.
BARBARA: What about Autloc? I’m sick and tired of all this arguing and quarreling. First the Doctor and now you. Why can’t you see what I’m trying to do?
Barbara has been only in the temple with regular contact with Tlotoxl & Autloc while Ian has been among the people and sees thing differently
BARBARA: Well you’re not helping. Tlotoxl’s evil and he’ll make everyone else the same.
IAN: They are the same, Barbara. That’s the whole point. You keep on insisting that Tlotoxl’s the odd man out, but he isn’t.
BARBARA: I don’t believe it.
IAN: Well, you must. If only you could stand away from this thing, you’d see it clearly. Autloc’s the extraordinary man here. He’s the reasonable one, the civilized one, the one that’s prepared to listen to advice. But he’s one man, Barbara. One man.
BARBARA: Then everything I’ve tried to do. Oh, I thought I could alter them.
IAN: You can’t fight a whole way of life, Barbara.
BARBARA: I suppose not. I’ve just been fooling myself.
Ian’s warning foils an attempt to poison Barbara, but Susan’s refusal to marry the “perfect victim” (scheduled to be sacrificed thus all his requests must be obeyed) puts her in Tlotolx’s power for punishment. Meanwhile the Doctor’s attempts to get discover not only leads to his accidental engagement to Cameca but allows Ixta to trap Ian behind a heavy stone which is regularly flooded.
The death trap for Ian turns into a way back into the tomb. He with the Doctor help secures a method of opening the sealed passage from the outside and aids Susan in her escape with the help of the Doctor’s affianced. Autloc disillusioned by all removes himself to the wilderness, no longer believing in the Aztec way, and after a climatic battle between Ian and Ixta the TARDIS crew escapes behind the wall. Tlotoxl sacrifices the perfect victim to the Gods as scheduled and history resumes its course. Barbara is despondent:
BARBARA: What’s the point of traveling through time and space if we can’t change anything? Nothing. Tlotoxl had to win.
BARBARA: And the one man I had respect for, I deceived. Poor Autloc. I gave him false hope and in the end he lost his faith.
DOCTOR: He found another faith, a better, and that’s the good you’ve done. You failed to save a civilization, but at least you helped one man.
and with that they enter the TARDIS and leave with the doctor keeping a keepsake of the first human women he ever was attracted to.