“All stories, in one way or another, are about this mystery of being a human being,” Mr. Gerstein said in a 2005 interview with TeachingBooks.net. “What are we here for and what are we doing? What are we supposed to do? How am I supposed to be a kid? How do I be a teenager? How do I be me?”

He often called the business of being human messy, difficult, even incomprehensible — and yet wonderful. Despite the weightiness of some of his subjects, he was a mirthful man who reveled in life’s mysteries, took delight in mischief-making and retained his capacity for wonder. Many of his books were laugh-out-loud funny.

“Mordicai had an unrestrained joy about life,” said his longtime friend Richard Michelson, a poet and author and the owner of the R. Michelson Galleries in Northampton, Mass., which represented Mr. Gerstein for more than three decades.

Mr. Michelson contrasted Mr. Gerstein’s work with that of another author he knew well, Maurice Sendak, who in “Where the Wild Things Are” and other books explored the melancholy and terror in children’s lives.

“Maurice plumbed the darkness in the joy,” Mr. Michelson said. “Mordicai brought out the joy in the darkness.”

That was evident in “The Man Who Walked Between the Towers,” which Mr. Gerstein wrote after the terrorist attacks of Sept. 11, 2001. It was a sign of his creative spirit that out of that tragedy he chose to celebrate Mr. Petit’s fantastical feat, a glorious day for the towers. But true to his style, he didn’t ignore the towers’ fate.