What happens when a child is charged with murder? Well, it depends. Salacious procedural episodes aside, these cases are so rare that there’s little precedent for how to proceed. When Tiffany D. Jackson came across one such story, of a 10-year-old girl in Maine charged with manslaughter for allegedly shoving pills down the throat of an infant her mother was babysitting, she immediately saw a story in it, but she added a twist: what if the girl might be innocent?

That initial idea became Jackson’s novel Allegedly, which tells the story of Mary B. Addison, a black girl who was convicted of murdering a three-month-old white baby when she was just nine years old. Now 15, Mary is living in a group home and trying to scrape together the money for college when she finds out that she’s pregnant. Desperate to keep her child, she sets out to escape the criminal justice system that’s defined the last six years of her life.

Jackson wrote her first draft quickly, in the aftermath of Hurricane Sandy, when she had a lot of free time and no internet connection, but it took years for her to shape that initial story into the final novel. After finding researching on her own was insufficient to help her understand what Mary’s life would actually be like, Jackson started talking to people familiar with the cases like her character’s: first COs, lawyers, and social workers, and then a group of girls who had been through the legal system themselves.

In speaking to these young women, Jackson found that they were far more resilient than she expected. Yet she also recognized their toughness from her own childhood. “I’m a Brooklyn kid myself, and that’s a lot of Brooklyn kids,” she says. “We go through a lot of different situations where we’ve seen a lot of stuff and we can’t sit there and keep wallowing in it. We have to keep moving forward.”

Despite the challenges they faced, the girls kept moving, never showing fear or pain and always working towards their goals. “I think people just expect kids that are in these types of situations to be up to no good and complacent about their life, but no, a lot of these kids out here are trying,” Jackson says. “They are really trying.” She gave that same mix of bravado and hope to her young characters, especially Mary, who is constantly working on the next towards her goals: saving up money, studying for the SAT, getting an ID so she can take the exam.

Unfortunately, Mary is stymied at every turn by the system that’s meant to support her. Even the people who want to help her — a driven lawyer, a friendly SAT tutor, her somewhat oblivious parole officer — often end up making the situation worse. “Everyone has the best Tiffany D. Jackson Cover intentions,” says Jackson, “but so does the devil.” In Mary’s world, no one, no matter how well-intentioned they seem, is totally innocent.

The lack of clear-cut villains or heroes drives home the fact that Mary is doomed less by any one individual than by a system that lets her fall through the cracks and then punishes her for the meager coping mechanisms she develops. Allegedly is hardly a message novel, but Jackson does intend for it to make readers think about the injustices of our criminal justice system. “Hopefully, she says, “this will spark outrage in children, who will then become adults and still be outraged.”

Alex Heimbach is a writer and editor in California.