“The Scorpions of Zahir” started with a journey. In the summer of ’98 I traveled with my husband Peter and our two teenage sons to Morocco. We didn’t encounter giant scorpions, attacking desert warrior tribes or planets hurtling toward earth, but the experience was seared deep into my memory: the heat and dust, the exotic colors and smells, the frenetic pace of Marrakech. Most haunting of all was the Sahara, where we traveled by camel and camped overnight in the desert. As our journey progressed, I became intrigued by the idea of how the desert changes you.

So I created an “alternate family” – the Pyms – who make a similar journey to Morocco. Zagora Pym, eleven years old, has one burning desire: to go to the Sahara and find the half-buried desert city of Zahir. When her father, Dr. Pym, receives a mysterious letter from a friend who’s been missing ten years and claims to be in the desert near Zahir, Zagora gets her chance. She sets off with her dad and older brother Duncan, who’s nerdy, squeamish and obsessed with astronomy – and who definitely doesn’t want to spend his summer vacation in Morocco.

I sent the Pyms on the same route that my family took in Morocco, beginning with the night train from Tangiers to Marrakech – a mysterious, frenetic city – where we spent a few days, then rented a car and drove over the High Atlas (the highest mountain range in Northern Africa), stopping at a cafe in the Tizi n’ Tiki Pass where we met Mohammed, a Moroccan boy who invited us to his family’s house. We continued south, into the Draa Valley, ending up in a dusty town called Agdz, where we dined with Mohammed’s family. The following day we drove to the edge of the Sahara, to Mhamid, barely more than a desert oasis, where we bartered for camels and started our trek into the desert.

Zagora is a combination of my favorite childhood heroines – Pippi Longstocking, Meg Murry, Jo March – and she grows braver and more determined the farther she goes into the desert. The desert changes not only her, but also Duncan and the two Moroccan kids, Mina and Razziq, whom they meet along the way.

I write fantasy for middle-graders because that was the age when I was most excited about books. Reading was like a journey to the desert, filled with danger, mystery and adventure. That’s why I hope my books will spark the imaginations of young readers, transporting them from the everyday world to far-flung magical realms and unexpected places.