Iona Opie in 1988. (Jack Manning/New York Times/Jack Manning/New York Times)

Iona Opie, who spent decades compiling children’s songs, games and folklore and, with her husband, published the “Oxford Dictionary of Nursery Rhymes” and other books capturing the spirit of childhood, died Oct. 23 at a nursing home in Petersfield, England. She was 94.

Her death was first reported by the Guardian. The cause was not disclosed.

Mrs. Opie and her husband, Peter, became accidental anthropologists of the rites and rituals of children and devoted their lives to what was then an overlooked field of study.

Walking in the English countryside as young newlyweds in the 1940s, they spotted a ladybird — or the small red-backed, black-dotted flying beetle that Americans call a ladybug. Almost without thinking, Peter Opie recited a verse from childhood: “Ladybird, ladybird, fly away home. Your house is on fire and your children all gone.”

Struck by the grim nature of the verse, the Opies went to a library to explore its origins.

“We had started on a treasure hunt which was to last 40 years,” Mrs. Opie later said.

Few scholars had thought that children’s rhymes, taunts and games were more than playground ephemera. But the Opies became self-taught anthropologists of what they called “the greatest of savage tribes — the worldwide fraternity of children.”

They discovered that child’s play was derived from cultural traditions hundreds of years old and, from one generation to the next, became ingrained in the habits and minds of children.

The couple produced their first book, “I Saw Esau,” in 1947. Four years later, they published the definitive “Oxford Dictionary of Nursery Rhymes,” which contained roughly 500 children’s verses, historically authenticated and recorded with scientific precision. The book drew the admiration of scholars and critics around the world.

In the early years of their collaboration, Mrs. Opie did much of the archival research, while Peter Opie was the primary writer. They published several other anthologies of nursery rhymes, which Mrs. Opie later called “the smallest great poems of the world’s literature.”

For “The Lore and Language of Schoolchildren” (1959) and “Children’s Games in Street and Playground” (1969), the Opies interviewed thousands of children, uncovering a juvenile world reveling in humor, insult, vulgarity and make-believe.

They traced the age-old origins of games and stories that are born anew with each generation. In different times and places, verses were uttered in unchanging words and rhythms, evoking the spell of an incantation or a curse.

The same stories and amusements traveled across the globe, with only slight variations. In France, Humpty Dumpty had his great fall as “Boule Boule,” in Germany as “Humpelken Pumpelken.” Games of hide-and-seek and tug of war were played in ancient Greece. Children in Egypt thrust out their fingers in an early version of rock, paper, scissors.

After her husband’s death in 1982, Mrs. Opie carried on their mission alone, often continuing to publish books under both their names.

In the 1988 book “Tail Feathers From Mother Goose,” she assembled rhymes that “provide comfort for the heart or an antidote to melancholy,” including one called “Welsh Rabbit”:

The gallant Welsh of all degrees

Have one delightful habit:

They cover toast with melted cheese

And call the thing a rabbit.

In the introduction to her final book, “Mother Goose’s Little Treasures” (2007), Mrs. Opie summed up her goals as a prospector of childhood’s wisdom and wit.

“What I was looking for — what I hope I have found,” she wrote, “are the most mysterious fragments from our shared memory: long-ago laughter of little meaning and echoes of ancient spells.”

Iona Margaret Balfour Archibald was born Oct. 13, 1923, in Colchester, England. Her father, a pathologist who worked at a tropical research laboratory in Sudan, was absent much of the time.

She became an avid reader and animal lover as a child and wanted to be a scientist.

During World War II, as a member of a women’s auxiliary branch of the British air force, she helped draw weather maps. After reading “I Want to Be a Success,” a cheeky book Peter Opie wrote as a young man, she wrote him a letter. They eloped in 1943.

They shared a love of language, libraries and ascetic living, and they eventually settled in a farmhouse in rural Hampshire. To focus more on their study of children’s folklore, they sent their own three children to boarding schools.

Despite having little money, the Opies amassed 20,000 books of children’s verse and literature, often called the largest and most valuable such collection in the world. It is now at the University of Oxford’s Bodleian Libraries.

Survivors include three children; five grandchildren; and two great-grandchildren.

In later years, Mrs. Opie received many honors as she continued to turn out new works. The first book she and her husband wrote together, “I Saw Esau,” was republished in 1992 with drawings by Maurice Sendak.

Other renowned illustrators, including Rosemary Wells, contributed to Mrs. Opie’s other books, including “My Very First Mother Goose” (1996).

“It would be hard to imagine a more perfect introduction to mystery, laughter and poetry than ‘My Very First Mother Goose,’ ” children’s author Nancy Willard wrote in the New York Times Book Review.

For years, Mrs. Opie continued to visit schoolyards and parks to observe children at play, recording their pranks, jokes and unending high spirits in “The People in the Playground.”

“Children are so vivacious,” she told the Observer, when the book was published in 1993. “They laugh at life. They can see all our absurdities.

“If an adult is being obnoxious, I say one of those rhymes in my head. If they are disagreeing, I might say, ‘Different people have different ’pinions, some like apples and some like inions.’ ”