The year is 2046. The overpopulation of Earth has led to the colonization of Mars—with the aid of the "first type" androids, men were able to begin terraforming the unfriendly environment of Mars and build the city of Saint Lowell. Seventy years after the start of colonization, the city is completed and inhabited by great numbers of people and "Second type" robots, much improved versions of the "First types".

The story begins with a space shuttle nearing the destination of Saint Lowell's space port. On board is Ross Syllibus, a middle-aged cop from Chicago. Syllibus asked to be transferred to the Martian Police Department to escape from his past and haunting memories of his beloved one being murdered by a robot. At the Saint Lowell's space port he is to meet his new partner—a young woman named Naomi Armitage.

On the same shuttle as Syllibus travels Kelly McCannon—"the last country singer in the Universe". As the shuttle nears the terminal, a mysterious man is seen entering the cargo section; soon after this, the intruder is noticed and the alarms go off.

Later, as Ross finally gets off the shuttle, he witnesses a disturbing scene at the airport. First he gets bumped into by the mysterious man with a big suitcase and two guards. Soon after that, a young woman with a gun orders the men to stop and get their hands up. Puzzled, Ross notices a few drops of blood spilling from the mysterious man's suitcase. A shootout between the young woman (who turns out to be Ross's new partner, Armitage) begins. The two robot guards are killed by Armitage and the mysterious man is wounded, but manages to escape. However, he leaves his suitcase behind—inside of which is the dead body of Kelly McCannon. To everybody's surprise and horror, McCannon turns out to be a robot: a new, never-seen-before "Third type" android that is superficially identical to humans.

Later, the mysterious man hacks into the public TV system and broadcasts the material taped by shuttle's security cameras. The tape shows the man murdering Kelly McCannon and reveals the fact of her being a robot to the entire city. The mysterious man, who introduces himself as René D'anclaude, reveals unbelivable news—the Third types have been among the regular people for a long time and nobody can tell them apart from humans. He also reveals a list of Thirds—and it turns out that a lot of well-known people are actually robots. Riots begin in the city as people start to capture and burn all the Thirds they can find. Meanwhile, René D'anclaude proceeds with his extermination of the Thirds. The two main characters start their investigation and eventually find out, that the victims are women...and some of those women were pregnant.

In a brief moment just before dying, one of the victims sends out a message with the list of Thirds to save them from being slaughtered. Armitage receives it and goes her way to stop D'anclaude. It is then revealed that Armitage is in fact a third herself and goes into hiding as the police hunt for her. Ross seeks her out as she enlists the help of a male third named Julian Moore. D'anclaude then attacks them and is revealed to be a second.

While the police drop the case with D'anclaude's supposed capture, Armitage and Julian search a databank for information on her origins. Suddenly, the latter is taken over by the real D'anclaude. Though Armitage is able to win, Julian dies. She teams up with Ross to break into the hospital D'anclaude was recovering in, branding themselves as criminals after the rescue.

Armitage and Ross later go off in search of her "father", Dr. Asakura, only to learn he had lost his mind, as explained by a gentler, reprogrammed version of D'anclaude, living with delusions of creating "Fourths". His line of assassinroids were used by the government to kill Thirds so that there will be fewer birth rates on Mars, meaning the planet will have to ally with Earth, which they just did, to receive immigrants. During their time at Asakura's facility, Ross and Armitage fall in love. The next day, after Asakura deactivates Armitage so he can install angelical wings and particle cannons on her chassis, the military attack the facility, killing the former, while the latter and Ross fight them to the finish. Months later, Ross returns to Mars, using false IDs, however Armitage throws hers away after Ross Sylibus' arrival. Ross then learns that he is going to be a father.