JUST AFTER ONE in the morning on Martin Luther King Jr. Day in 2004, two teenage cellmates at the Preston Youth Correctional Facility in Ione, California, were found hanged from their bedframe by their sheets. Their families insisted that a white supremacist group had murdered them. The school authorities eventually concluded that there hadn’t been a struggle, and their deaths were ruled suicides. It had been eight years since the last suicide at Preston, although the California Youth Authority admitted to reporters that there had in fact been 56 suicide attempts system-wide in the four years before the double hangings.

Civil rights activists called Preston a “cold, old, antiquated dungeon,” and articles painted a grim portrait of a school plagued by gang warfare, sexual violence, and mistreatment. In 2011, after 117 years of operation, the facility shipped its wards to various other juvenile detention centers and closed its doors forever. It had been one of the oldest correctional facilities in the state. California assemblywoman Alyson Huber had strong words about the decision. Preston had employed over a quarter of Ione’s population; Huber told the media that closing it would “kill an entire county.”

In Goodhouse, first-time novelist Peyton Marshall imagines what Preston might have evolved into had it lasted until the end of this century. In Marshall’s world, the US government tests felons and their families for specific genetic markers that show a propensity for violence. Young children with these markers are seized from their parents, renamed, and put into “Goodhouses,” where they are raised to combat their criminal impulses. Marshall’s Preston — called “Ione,” after the town — is one of the many Goodhouses that dot this near-future landscape.

The novel opens on “Community Day,” a kind of Rumspringa when Ione’s wards are permitted a day outside of school walls, spending time with a family and serving as ambassadors for the Goodhouse program. James is 17, one year away from permanent release into the world. Like the other Goodhouse students, James knows almost nothing about himself — his real name, his family, where he’s from, even his own race. Stripped of his actual identity, he has another thrust upon him: that of his Goodhouse ranking and mark.

Goodhouse encouraged us to think of ourselves as two people in one body. One person was fine and ordinary, while the other was filled with bad impulses […] Owen said that Goodhouse treated all its students like budding schizophrenics. And though we joked about it, I was sincerely worried that I’d never experienced this duality. I knew myself to be only one person — and how good or how evil this person was, I didn’t really know.

When James arrives at his assigned family for Community Day, he interrupts an ill-timed baby shower. A member of the family, the beautiful and enigmatic Bethany, seems particularly interested in his presence — James notes in a somewhat muted fashion that she is the first girl his age he’s ever seen — but the others send him to chop wood. When an emergency leaves James alone in the house, he steals one of Bethany’s barrettes and secrets it away in his pocket. “The day I committed my first crime,” he tells us, though he has been behind reform school walls for almost his entire life.

When this crime is discovered, it sets James off on a downward spiral through Ione’s ranking system. He is plagued by traumatic memories of his last school — burned to the ground by religious radicals bent on eliminating the Goodhouse boys from this earth — and becomes enraged by a system that seems designed for him to fail. As Ione’s Founder’s Day approaches, he grows increasingly convinced that the dangerous extremists who destroyed his former school have infiltrated Ione. James quickly becomes caught in an undertow of violence and corruption. He must cross Dr. Cleveland, the terrifying director of medical studies, evade a group of brutish class leaders, and navigate a nightmarish bureaucracy, all the while nursing a budding romance with Bethany.

Goodhouse is, at heart, a genre-straddler. The science fiction premise braids tightly with literary fiction’s allegiance to language and a thriller’s vise-grip on plot. The prose is clean and striking; the world well-built and its moments well-observed:

My heartbeat accelerated, leaving evidence of wrong-thinking in my file — joining the hundreds of student heartbeats that were currently flowing into the Goodhouse servers. Sometimes I imagined that this was what powered the school, that we ourselves fueled the lights, the Lewistons, the fence.

The politics and philosophy of the novel — its meditations on free will and indictment of contemporary societal problems — and its moments of beauty never bog down a taut plot that moves relentlessly. The result is a gorgeous, fast read that strikes uneasily close to home. A prison system that forces its inmates to work in dangerous conditions, perform risky “volunteer” jobs for reduced sentences, and exposes them to sexual exploitation? A system that targets a specific group and sets them up for failure? Doesn’t sound terribly fictional, does it?

In particular, the Goodhouse ranking system is reminiscent of our own three-strikes laws or the school-to-prison pipeline. “When you lost status,” James tells us, “you could fall precipitously. Perhaps you were treated differently and so you became different. It was hard to know where it started or where it would end.”

But like the best speculative fiction, the allegory of Goodhouse is complex and doesn’t map cleanly onto a single set of ideas. The reasoning behind the world of Goodhouse is equal parts prison system and concentration camp, religious extremism and social engineering, with a hefty dollop of technological anxiety. And while Goodhouse’s world is futuristic, the flaws in its system are both contemporary and historic. It asks: What does it mean to, in the name of law and order, deliberately create a vulnerable population?

¤

Goodhouse’s other major philosophical hub is the intersection of criminality, genetic predisposition, and free will. Is identifying a genetic marker for violent behavior the same thing as knowing what a person will do? Should people be punished for their inclinations? Do people do bad things because they are inherently bad, or because they have chosen to act badly? The presence of a sometimes-radicalized Christianity in this world creates a fascinating canvas onto which these questions can be projected. In some interpretations — as with the Calvinist doctrine of predestination — it is a faith in which free will is an illusion and all actions are preordained, or might as well be. In one of the book’s smartest and most poignant moments, James observes that they all might be a part of some inscrutable network of checks and balances:

Vengeance belongs to God. That’s what I’d been taught. La Pine had been more religious, more explicitly Christian, with its Bible classes and its daily church services. Our headmaster had seen to this. But Ione was not the same, and I was alarmed at how easily the patterns of religion had fallen away, how quickly my beliefs had proven to be nothing more than habit. The strong dominated the weak. This was what I knew, this was what I observed every day — it was nature. Maybe I wasn’t a bad piece of genetic coding; maybe I was an intentional adaptation to a complex ecosystem. Wrong-thinking could ultimately be a civilizing force. Criminals necessitated law, and law enabled communities to cohere and grow. There could be no Bible without the Devil.

Eventually James is forced to stand before a committee that will decide his fate within the Goodhouse system and, ultimately, the rest of his life. The committee members alternate between hostile and indifferent, sometimes confusing him with other boys. “You don’t even know me,” James yells at them in a moment of frustration. “You can’t predict what I’m going to do.” It’s startling because the entire premise of the Goodhouses is built on the presumption that they do know him, better in fact, than he knows himself. But James’s assertion is ignored, and his voice ultimately drowned out by a larger group who have convinced themselves they are doing the right thing.

¤

There are a few moments where Goodhouse stumbles. Its primary weakness is Bethany, who hovers on the edge of Manic Pixie Dream Girl status — make that manic-pixie-hacker-with-a-heart-problem-dream-girl status — and never quite develops beyond that. Her appearances and disappearances seem to function only as ways to shape James and set and deploy particular plot landmines. James’s gender is critical to the novel and its source material — men in the prison system are dragged through a particular kind of hell — but as the novel’s only major female character, Bethany feels disappointingly slight. Marshall also briefly tosses around ideas about eugenics and epigenetics — we learn that the lowest ranked Goodhouse boys are sterilized, for example, and that some of them chose to be even before they graduated — but does not engage with the possibilities as deeply as she could have, a real missed opportunity. As recently as 2010, the state of California performed almost 150 unauthorized sterilizations on female inmates. One has the sense that further exploration of genetic manipulation and sterilization may have opened up exciting avenues in the narrative. It’s enough to make one wish for a sequel.

But these weak moments are ultimately of little consequence to the novel’s beating heart. Ultimately, this reader was spellbound by Goodhouse — by its grim illustrations, its unrelenting pressure, and its central proclamation: to sate its own anxieties, society will sacrifice vulnerable bodies in any way it sees fit.

¤

Carmen Maria Machado is a fiction writer, critic, and essayist whose work has appeared or is forthcoming in The New YorkerThe Paris ReviewAGNIGranta, NPR, The American ReaderVICEWomen’s Review of Books, and elsewhere.