In 1518, a dancing fever plagued the city of Strasbourg (in modern-day France), causing hundreds of people (predominantly women) to dance for days without stopping. Many died from exhaustion, heart attack, or stroke.

This historical episode, and two young characters who live through it, is one of the threads in Anna-Marie McLemore’s astonishing new YA novel, Dark and Deepest Red (Feiwel and Friends, Jan. 14). The other is a reimagining of Hans Christian Andersen’s “The Red Shoes” featuring two teenagers living 500 years later in America.

McLemore’s fascination with the medieval Alsatian dancing plagues led them to Strasbourg to research in situ, and that is where they found out that Andersen’s tale “has some likely but little-known historical connections to that specific dancing plague. That was a moment of absolute magic,” they say, “because I had already decided I wanted to write about ‘The Red Shoes’ and the dancing plague, and here was history whispering that they belonged together all along.”

Speaking of belonging, the four main characters’ story arcs have a lot to say on the subject as they interconnect across time and space. “[Mexican American] Rosella’s cursed red shoes make her confront how she’s measured herself and her body by white beauty standards,” McLemore explains. “The family history that haunts Emil causes him to reexamine the Romani heritage he’s learned to downplay. Lala conceals her own Romani heritage from a city that outlaws her very existence, but it’s in defining who she is for herself that she learns to fight back. Alifair gets by as a trans boy in medieval Strasbourg by making sure he never makes waves, but by the end of the story, he’ll help determine the future not only for himself and Lala, but for a whole community.”

Juxtaposing a bizarre historical event with a fairy tale to tell the lived experiences of marginalized people of color and LGBTQIA people in a way that is empowering to these communities is standard practice for this award-winning author whose own queer Latinx background informs their writing. In fact, after receiving a Stonewall Honor from the American Library Association in 2017 for When the Moon Was Ours, they say they “went all in writing about my identities. I felt both a freedom to be who I was and a responsibility to tell the queer, brown, trans, nonbinary stories I wanted to tell.”

McLemore talks openly about how Dark and Deepest Red, a book about characters interacting with history, “became about me interacting with it, too.” The author’s note is left unchanged from when it was first written, describing the author, who now identifies as nonbinary, as a girl, a woman, and Latina rather than Latinx. “So often, our identities are works in progress,” McLemore says, “and this gave me the unexpected chance to be an affirming voice for readers who are on those journeys too.”

McLemore’s retellings of traditional European fairy tales typically are framed as magical realism. In Dark and Deepest Red, we know it’s 2018, but not a 2018 that is recognizable to us in its vague mix of modern and traditional. “Magical realism is a home to me as a Latinx writer,” McLemore says. “Magical realism is where I talk about things that are always there in fairy tales, even if the original fairy tales don’t dare to speak of them.

As a funny aside, the author shared how they missed the call about the Stonewall Honor becauseI was making out with the trans guy I’m lucky to call my husband; it might have been the gayest moment of my life up to that point.” It’s very clear that for McLemore, this pride and joy in one’s identity is part and parcel of their writing too—where visibility and representation truly matter: “I want readers to know they deserve happy endings in their own lives, that we deserve to be not only accepted, but loved for who we are, and that means showing characters like them having happy endings on the page.”

Ana Grilo is co-editor of The Book Smugglers blog and co-host of the Fangirl Happy Hour podcast.