In the Norwegian folk tale “East of the Sun, West of the Moon,” a white bear bargains for the hand of a poor girl, soon revealing himself to be a handsome prince with a well-stocked refrigerator and rather sizable real estate holdings.

No such luck for 13-year-old Astri, the dreamy but sharp-elbowed heroine of Duluth author Margi Preus’ latest release, “West of the Moon.” Sold off by her scheming aunt and uncle to a hunchbacked goatherd named Svaalberd, Astri soon discovers he’s even more disgusting than he seems. Held captive on his property is a strange yet familiar girl, who spins wool all day and never speaks a word.

Preus, who wrote the Newbery Honor Book “Heart of a Samurai” (2010), is a clever yarn-spinner herself, using a journal entry written by her great-great-grandmother Linka Preus as the springboard for this rollicking middle-grade adventure.

Setting her book against the “America fever” sweeping Scandinavia in the middle of the 19th century, Preus provides plenty of historical context for young readers — including a fascinating explanation of rickets helpful for any fan of fairy tales. But her attention to historical realism never overshadows her story’s mix of magical realism and Norwegian myth, or a damsel who proves quite capable of saving herself. (Note to parents and librarians: Though the cover reads younger, this story includes a whiff of sexual assault and much-deserved manslaughter some chapters later. Be warned.)

Threatened with a trip to the altar, Astri makes a break for it, rescues her younger sister Greta, and they lie, cheat and steal their way onto a ship bound for America. While these questionable actions often cause Astri to doubt the essential goodness of her character, readers won’t share those concerns. She may not go straight to heaven, but chances are good she’s going to find her way to Minnesota someday.