Romana, Darkel, and Matthias are about to announce their intentions to stand for the Presidency of the Time Lords; even Surgeon-Master Elbon has returned to the society he'd once rejected in order to enjoy the spectacle. But before their candidacies become official, Darkel points out that, had it not been for the civil war, Romana would have been impeached on charges of high treason. Since an election is now being held, this means that Romana is by definition no longer President and did not name a successor, which means that it was not her choice to be removed from office. Thanks to precedent passed during the Morbius affair, Article 17 does not apply in such a case, and Romana is thus ineligible to stand for office. Since the High Council has been disbanded until after the election, Darkel currently stands as the highest legal authority on Gallifrey, and she thus orders Janartis to arrest Romana. But Matthias quotes another legal precedent, which reveals that the three candidates themselves form the de facto High Council until after the election. Caught out by her own insistence on legalities, Darkel cannot deny this, which means that Matthias holds the tie-breaking vote... and to Romana's shock, he casts it in favour of impeachment. Janartis places Romana under arrest, leaving Darkel and Matthias as the only two candidates in the election.
Later, Matthias speaks privately with Darkel, claiming that he wants to give the people a simple choice between two candidates; a third could split the vote, leaving the winner to rule with a minority government. Romana still remains popular, however, and Matthias thus suggests annulling the effects of her Presidency from the moment when it all began to fall apart; this will create a public perception of Romana's incompetence without raising the question of why she was allowed to stay in a position of power for so long. He suggests that the moment at which Pandora escaped from the Matrix can be seen as the deciding factor that led to the downfall of Romana's Presidency and the civil war; all of Romana's decrees and laws from this moment onwards can thus safely be declared null and void. Darkel agrees, and sets off to make the public announcement herself, cutting Matthias out of the loop entirely -- and unaware that this is exactly what he'd expected her to do.
Meanwhile, Leela insists that Narvin attack the cells to rescue Romana, but he refuses to start another civil war; they must fight this battle using their enemies' weapons of politics and law. Romana is not allowed to have visitors in the cells, but even Darkel can't forbid her from consulting with her legal counsel -- and Narvin thus appoints K9 to this position, with Leela as his assistant. K9 and Leela visit the cells to find Janartis keeping a watchful eye on Romana; fortunately, Annos has been promoted to Acting Castellan, and he thus outranks Janartis and is able to order him out of the cells. He then leaves himself, choosing to interpret Darkel's orders creatively and allow Romana to consult her "legal counsel" in private. K9 begins to outline possible legal defence scenarios, but Romana stops him, sure that Darkel intends to avoid a public trial; instead, she asks Leela and K9 to speak to Matthias and find out just why he's chosen to betray Romana. Leela and K9 thus set off for Matthias' quarters, and are just in time to see him slip secretively away. Or rather, since Leela is blind, it's K9 who sees this and who guides her after Matthias, down the service stairway into the catacombs. Leela and K9 must remain silent and at a distance, and when Matthias meets up with someone, they are too far away to identify his contact. K9 rejects as impossible his only identification of the figure, and Leela gives away her presence while trying to get closer and is forced to retreat.
Darkel summons Janartis to explain why he left Romana unguarded, and he reveals that, while he had no choice but to obey Annos' orders, he left the prison surveillance system active and recorded Romana's conversation. Since it appears to consist of K9 discussing esoteric legal matters, Darkel and Janartis switch off, deciding that Romana has given up hope. And since Janartis has proven his loyalty to her, Darkel thus asks him to carry out a special task for her, one he need not discuss with Annos. Darkel then visits Narvin to request that he support her candidacy; her denouncement of Romana has backfired somewhat, as the public seem to have interpreted this as a petty act of spite on Darkel's part. Darkel nearly loses her temper at this, insisting that Romana's incompetence is beyond question; what sort of President appoints a High Chancellor only to rescind his position and exile him in disgrace within days? Narvin reminds Darkel that Braxiatel sacrificed himself to keep Pandora contained, but Darkel in turn reminds Narvin that he's the one who provided the evidence that condemned Braxiatel to exile for breaking the laws of Time instead of allowing him to leave with his dignity intact. Narvin now believes this to have been a mistake, but Darkel advises him to think carefully about his future before he makes another one...
Leela meets with Matthias when he returns, but he tells her that, while he sympathises with Romana's position, the public must see him to be impartial. These are confusing times for the Time Lords, as there hasn't been an election for millennia. An outgoing President traditionally names their successor, and if this is impossible, then the Chancellor takes the position; but in this case, Romana's Chancellor was Braxiatel, whose position was rescinded when he was exiled from Gallifrey. Matthias promises to do his best to match Braxiatel's qualities during his forthcoming debate with Darkel. Meanwhile, Annos visits Romana, who is being guarded by Robersuun while Janartis is off shift, and tells her that he's given orders to ensure that K9 and Leela will always be allowed to consult with her. He also admits that he doesn't intend to vote in the election, as Romana is the only person he trusts to place Gallifrey before her own selfish interests.
The candidates' debate is held in the Panopticon with Narvin mediating. Elbon questions whether it's wise to continue vesting supreme power in a single individual, and while Matthias states that he has full confidence in the Gallifreyan status quo, Darkel turns her answer into a speech denouncing tyranny and violence, which isn't actually what the question was about. Before she can complete her tirade, however, someone in the crowd shoots her and then flees -- and since he is dressed in the uniform of a Chancellery guard, nobody thinks to stop him until it's too late. Annos and his men pursue Darkel's assailant into the catacombs while the injured Darkel is taken for medical attention. Narvin and Leela both note that Darkel's death would have made Matthias President by default, but he insists that, unlike Darkel, he would never stoop to such tactics to rid himself of a rival.
Leela and K9 tell Romana what's happened and wonder who the assassin was working for. Matthias is the obvious suspect, but Leela believes in his innocence. Perhaps the assassin was meant to hit Matthias, but missed. An incoming President traditionally declares amnesty for political prisoners; perhaps Darkel promised the assassin that he would be freed when she became President, but perhaps she really intended to use the assassination as a precedent to overturn this tradition, which would give her an excuse to keep Romana locked up as well. K9 then announces that he's been monitoring Matthias' communications, and that Matthias has just received an encrypted message and returned to the catacombs... which is where the assassin fled to. Leela and K9 follow Matthias, and see that he is once again meeting with the figure he met earlier -- but K9 is also monitoring the guards' communications, and he reveals that they have cornered the assassin some distance away. Whomever Matthias is meeting, it's not the assassin, but someone else.
Darkel soon recovers from her slight flesh wound, and contacts Annos with instructions to ensure that this matter be dealt with promptly before the election. Although she does not use these exact words, it's clear that she's ordering him to ensure that the assassin is not captured alive. Instead, Annos contacts Narvin and tells him that he's received a certain suggestion from someone who may be suffering from clouded judgement due to a recent injury. Narvin understands perfectly, and tells Annos that the CIA would prefer that the assassin be taken alive for questioning -- and that it's probably best not to trouble Darkel with the details of the operation, in order to give her a chance to recover fully. Narvin then contacts Robersuun and has him move Romana to another cell; Darkel has ordered the guards to make note of everyone who visits Romana's cell, but neglected to have them monitor any visits Romana herself might make. Narvin and Romana discuss the assassination attempt, and Narvin reveals that Darkel's popularity has skyrocketed since the apparent attempt on her life -- which it now seems was probably staged to gain her public sympathy and cast suspicion on Matthias.
Annos contacts Narvin and reports that the assassin has been taken alive, and before Narvin sets off to interrogate the prisoner, Romana suggests that he break into Braxiatel's office, which was sealed after his exile but might contain some evidence explaining why Darkel was apparently so keen to annul the latter period of Romana's Presidency. Narvin asks Leela and K9 to do so for him, and Leela and K9 thus visit Braxiatel's offices, which have been sealed in temporal suspension behind a stasis lock. At least, they should be, but K9 finds that the lock has already been deactivated. The door opens, and Braxiatel himself addresses the shocked Leela and K9 from within...
Darkel is furious when Annos reports that the would-be assassin -- Janartis -- is alive and in maximum security, waiting for Narvin to interrogate him. He's said nothing so far, perhaps because he's been ordered to remain silent by someone he believes to be his superior. Darkel does not appreciate the clear accusation, and warns Annos that he's disappointed her -- a dangerous thing to do, since exit polls place her well ahead of Matthias in the electoral race. Annos dismisses the warning and returns to the holding cells, where Henzil has failed to get anything of use out of Janartis. However, Annos plays the bad cop very convincingly, and Janartis is shaken when Annos claims that Darkel didn't intend for him to be taken alive -- and that although Annos himself is now in Darkel's bad books, there's an easy way for him to appease her. Janartis panics as Annos approaches him...
Leela rushes to Romana's cell to tell her about Braxiatel, but she's out of breath when she arrives and unable to deliver her news before Robersuun arrives to escort her and K9 out to the Panopticon to witness the end of the election. Narvin watches cynically as Valyes, in his role as Lord High Returning Officer, declares that the votes have been counted -- but tradition demands that the Time Lords confirm that this election has been carried out fairly and impartially before the results are declared, and Braxiatel unexpectedly steps out of the crowd and announces that it has not. He had been exiled to prevent Pandora from escaping back into the Matrix, but since there is no longer a Matrix, there is no longer any risk of this happening. Darkel realises too late that Romana appointed Braxiatel as Chancellor before Pandora escaped from the Matrix and stripped him of his title afterwards -- which means that only the latter action has been annulled. Braxiatel is still the legal Chancellor of Gallifrey, and thus its legal President, rendering the results of the election null and void.
Braxiatel now orders Annos to place Darkel under arrest, but smugly admits that he's doing so just to make a political point -- and Darkel seizes on this admission and reminds him that an incoming President must pardon all political prisoners. Apparently caught out, Braxiatel is forced to do so, but while this means that Annos must release Darkel, Narvin suspects that she hasn't won the victory she thinks. Braxiatel then starts to stumble over his words, and dismisses the assembled Time Lords, claiming that he needs time to rest. Leela and K9 escort him back to the Presidential office, and before following, Darkel informs Narvin that, in the absence of any Presidential edict, she earlier used her authority as Inquisitor Prime to draw up execution orders against Romana. She orders Narvin to carry out the execution immediately, as she still has a few tricks up her sleeve -- and when she is President, she'll remember who helped her and who hindered her.
K9 now understands that he didn't make a mistake earlier; it really was Braxiatel meeting with Matthias in the catacombs. Braxiatel admits that Pandora's essence is still inside his mind, but without the Imperiatrix to control it, all that's left is the raw hatred and evil from the dark partition of the Matrix. It no longer has the capacity for reason, and may instinctively try to escape from its mental cell -- but since there is no Matrix for it to flee to, this will mean its death as well as the death of its host. The lead-lined walls of the Presidential suite help him to keep it under control, as does the absence of other Time Lords. Darkel then arrives to speak privately with Braxiatel, and when he dismisses Leela and K9 to speak with Darkel alone, she reveals that she's guessed his problem -- and knows that thinking consciously about the creature in his mind makes it more difficult for him to keep it under control. She enjoys watching him struggle for control before ordering him to resign and name her as his successor; if he refuses, she'll see to it that Pandora eats his mind from the inside out. Meanwhile, Narvin visits the cells to warn Romana what's happened, but then Matthias arrives with orders from the new President...
The Time Lords assemble once again in the Panopticon, where Braxiatel announces that, due to circumstances beyond his control, he must resign his position as President. But he has no intention of naming Darkel as his successor. Romana enters the Panopticon, and Braxiatel reminds the enraged Darkel that he gave the order to release all political prisoners; this did not just include Darkel, but also Romana -- and Janartis, who has confessed to Annos that Darkel ordered him to fake an attempt on her life in order to gain public support. Braxiatel has her arrested again, and since he's already pardoned her once, nothing compels him to do so for a second time. Furious, Darkel carries out her earlier threat and reminds Braxiatel of the monster he's holding inside his mind, desperate to feed on his greed and ambition. He begs her to stop before it's too late, but she pushes him until he breaks, and the creature slips out of his control, free to devour its host. But Braxiatel now reminds Darkel that she was standing nearby, gloating, when Pandora attacked him... and her ambition and greed was stronger than his. Braxiatel's mind was the key, but it was not the prison. Too late, Darkel feels the creature eating away at her mind, and although Braxiatel appears honestly sorry for her, there's nothing he can do now. Darkel begs for mercy, screams in agony, and drops to the ground, her mind burned out. The evil, twisted creature is dead at last -- and so is Pandora.
Braxiatel admits that, in order for his trap to work, he had to hold a small portion of the Pandora creature within his own mind. It wasn't the entire creature as everyone had thought, but enough of its evil remains in his mind to necessitate his return to exile. Before going, he must resign as President and name his successor. Darkel's death seems to have cleared the last obstacle between Romana and the Presidency -- but to her shock, Braxiatel instead names Lord Matthias the new President of the Time Lords...