The plot revolves around fourteen colonists of the world Delmak-O. They are: Betty Jo Berm, a linguist; elderly Bert Kostler, settlement custodian; Maggie Walsh, a theologian; Ignatz Thugg, who oversees thermoplastics; Milton Babble, a physician; Wade Frazer, a psychologist; Tony Dunkelwelt, a geologist; Glen Belsnor, who specialises in telecommunications; Susie Smart, a typist; Roberta Rockingham, a sociologist; Ben Tallchief, a naturalist; Seth and Mary Morley, a marine biologist couple; and Ned Russell, an economist. They inhabit a universe in which the deities of their religion actually appear to exist and can be contacted through a network of prayer amplifiers and transmitters. Tallchief is transferred to Delmak-O as a direct result of his praying.
Delmak-O is mysterious and largely unexplored. It seems to be inhabited by both real and artificial beings and enormous cube-shaped, gelatinous objects ("tenches") that duplicate items presented to them and give out advice, in anagrams reminiscent of the I Ching. In addition, various members of the group report sightings of a large "Building". As various calamities continue to befall each character, part of the group ventures out to find the Building. However, each member of the group perceives the Building differently and determines it to have a different purpose.
One by one Tallchief, Smart, Dunkelwelt, Kostler and Walsh either kill themselves or are killed under mysterious circumstances. During a fight between the remaining colonists Seth Morley is shot through the shoulder causing an artery to be severed. While recovering from an attempt to repair the artery, Morely is abducted by armed men who kill Belsnor. They put Morely aboard a small flying craft but Morley overpowers them and takes control of the craft. With it he discovers that Delmak-O is in fact Earth, and he returns to the group to report this.
Once Morely informes the remaining colonists of this, the group then come to the conclusion that they are all part of a psychiatric experiment. Once they admit to having killed the other members they conclude that the experiment has been a failure. It is at this point that they notice that each of them are tattooed with the words "Persus 9." They decide to ask a tench what this means but doing so causes the tench to explode and the world around them to crumble to pieces.
All of them, including the colonists thought to be dead, awake to find that they are actually the crew of a spaceship that has become stranded in orbit around a dead star with no way of calling for help. It becomes clear that the whole experience had been a kind of virtual reality designed to help them pass the time. Seth Morley is depressed by this and wonders whether it would be better to let all the air out from the ship and thus kill them all rather than live out the rest of their lives engaging in virtual reality with no hope of rescue. Before he acts, however, an aspect of the deity, supposedly existing only in the virtual reality and not part of the "real" world appears before Morely and removes him from the ship. The others, unconcerned with his disappearance, embark on another hallucination which begins in exactly the same way as the previous one, only this time without Seth Morley.