The genetics
Genetics shapes both the society and the love story. In this world, widespread use of in vitro fertilisation, embryo splitting and cloning means that people cannot know who they are related to, so the law called Code 46 forbids reproduction between any two people who share 25% or more of their genetic identity; violations are detected through genetic tests, pregnancies are terminated, memories erased, and viruses are used to make offenders physically averse to their partners. Genetic and health information is also used to decide who may live and travel inside the cities. William's discovery that Maria is a clone of his mother turns the affair into a form of incest. The film does not focus on scientists but on the state and corporate apparatus that applies genetics, and critics noted that it explains its biotechnology through opening text rather than exploring it. The 25% threshold corresponds to the relatedness between, for example, a grandparent and grandchild. As a clone of his mother, Maria would share about half of William's genome, as a mother does.
The story
In 2077, people live either "inside" in tightly controlled cities or "outside" in the desert as an underclass, and movement is regulated by "papeles", travel documents issued as insurance cover. William Geld, an investigator from Seattle, is sent to Shanghai to find who is forging papeles at the company that issues them. Helped by an engineered empathy virus, he identifies Maria Gonzalez as the forger, but he is drawn to her, blames someone else and begins an affair with her. When he returns, Maria has been taken to a clinic: she was pregnant, and the pregnancy was terminated as a breach of Code 46, which forbids reproduction between genetically related people. Her memory of him has been erased. William tests her DNA and discovers that she is a clone of his mother. He takes her to Jebel Ali, where they flee together, but they are caught after a car crash. William's memories are erased and he returns to his family, while Maria is exiled outside.