Anan 7 was the leader of the planet Eminiar VII. His world had been at war with the neighbouring planet of Vandikar for 500 years. The war was conducted solely by computer simulation, allowing life to continue as normal on both planets: One side would launch a simulated attack, the other side would record those killed during the attack and the casualties would voluntarily report to disintegration chambers to be killed. Even though his wife was a casualty of one of the attacks, Anan 7 was a firm believer in the system.
When the Enterprise arrived at Eminiar attempting to form diplomatic relations, Anan 7 initially tried to warn them off but eventually accepted Captain Kirk and his landing party as guests. Not long after, however, there was a Vandikan attack. Not only was Anan's daughter Mea registered as a casualty, but so was the Enterprise. When Kirk refused to order his crew to beam down to be killed, Anan had him and his party taken prisoner. He first tried to use a simulation of Kirk's voice to order the crew to beam down, then fired on the Enterprise in an attempt to destroy it. Meanwhile, Kirk and his party escaped and destroyed a number of disintegration chambers, meaning Eminiar was struggling to make its quota.
Anan contacted the Enterprise again, claiming the attack was a mistake. Ambassador Fox beamed down but Lieutenant Commander Scott refused to lower shields, robbing Anan of his chance to destroy the ship. Anan recaptured Kirk and threatened to have him and the other hostages killed if the Enterprise crew didn't submit to death. Kirk responded by ordering Scotty to destroy the planet if he didn't hear back in two hours, then managed to get the drop on Anan and the council.
Kirk and Spock destroyed Eminiar's computers, ending the simulated war and giving the two planets a choice: Wage a conventional war or sue for peace. Anan agreed to attempt the latter, with Fox offering himself as an independent mediator.