These days, it almost sounds like a fairy tale: a picture book is plucked from the depths of the slush pile by a sharp-eyed assistant.

But that’s the story behind Sophie’s Squash, the tale of a girl who turns a butternut squash meant for the dinner table into her best friend, complete with a drawn-on face and a name, Bernice.

The book, written by first-time author Pat Zietlow Miller, received more than a dozen publisher rejections before Stephanie Pitts, then an editorial assistant, discovered it buried a foot deep in the slush pile at Random House imprint Schwartz & Wade in September 2012. Immediately, she knew she had a treasure.

“I had quite an emotional response,” Pitts said. “I knew I had to give it to Anne [Schwartz] right away because I knew it was something special. Pat’s writing was very clever and spare and she seemed to have a really good understanding of the picture book format.”

Schwartz, v-p and publisher of the imprint, agreed immediately. She called Miller the same day she read Pitts’s reader’s report and signed the author on the spot.

“I really like books about spunky characters,” Schwartz said, “and the idea that Sophie had such a personality was one of the real draws.” Also, she said, “It was an idea that I knew had universal appeal and yet it was handled in a very unusual way.”

Miller, naturally, was thrilled to get the call. She’d been writing children’s books for four years while maintaining a day job at an insurance company. Her own daughter, Sonia, now 11, was the inspiration for the Sophie story: at three years old, Sonia pulled a butternut squash out of her mother’s grocery cart and cradled it.

“By the time we got home it had a face,” Miller said. “We never did eat it. And I was not as patient as the parents in the story. I was like, ‘That thing is gonna rot.’ ”

In the story, as Sophie’s squash begins to spot – “Freckles,” Sophie declares – she decides to bury it in the garden. The following summer, she has not one squash buddy, but two.

“I wanted to write that friends come in all shapes and sizes,” Miller said. “Anybody can be a friend if you just look at them with the right set of eyes.”

Sophie’s Squash, with watercolor illustrations by Anne Wilsdorf, is Miller’s first book, but more will soon follow. Schwartz & Wade will publish her Sharing the Bread: An Old-Fashioned Thanksgiving Story in 2014 and she has projects in the works with Little, Brown and Chronicle, the author said.

In a fairy tale, she who rescues the princess from the dungeon is rewarded. As for this story’s original heroine, Pitts has since been promoted to assistant editor. And, she said, she’s still wading through the slush pile: “I always try to come at it with a sense of possibility.”

Sophie’s Squash by Pat Zietlow Miller, illus. by Anne Wilsdorf. Random/Schwartz & Wade, $16.99 Aug. ISBN 978-0-307-97896-7