ST. LOUIS – Thousands of trick-or-treaters will soon dress up around the St. Louis region and go door-to-door looking to score some tasty treats. But they might need to earn it with their sense of humor.

As part of one Halloween tradition in the St. Louis area, your child might be asked to tell a joke in exchange for candy. Occasionally, this may come as a surprise to parents who venture out with their children for the first time, families who recently moved to the St. Louis area or out-of-towners.

It’s hard to pinpoint exactly when this started, but jokes have been part of the St. Louis trick-or-treating experience for decades. As to why, it might depend on who you ask.

Trending: Missouri doesn’t have a red flag law, renewed legislation aims to change that

Folklorist John Oldani offers some insight in his 2013 book St. Lou-isms, noting the tradition is tied to Irish culture. Historians say, as part of an Oct. 31 festival that originated around 2,000 years ago, people would disguise themselves and ask people for items to keep an evil spirit away.

In many cases, it’s believed the participants were asked to sing a song or tell a joke. Once they fulfilled that request, they would acquire an item to avoid an evil entity.

The Missouri History Museum came to a similar conclusion ahead of a Halloween event last week. Emily Underwood with the Missouri Historical Society found some research from a historian and linguist who suggests that the tradition might be common in St. Louis due to city’s influence on Irish immigrants.

“There was a tradition in Ireland and Scotland where kids would go around to houses and sing a song that was like a song for the dead,” said Underwood. “In exchange for the song, they would receive a little cake or something. And that’s kind of how the song sort of evolves to be a song, a poem or a joke. Anything, really.”

Top Story: Teen shot, killed near Florissant church

Local author Ryan Nusbickel published a children’s book several years ago that tackled the tradition and offered some St. Louis-centric jokes. It follows a fictional storyline of how a brisk autumn wind ultimately sent his jokes into the sky on Halloween, leading to a chase in the St. Louis area to find them.

All of that considered, St. Louis might not be the only spot you hear jokes on Halloween. A 2011 National Public Radio report says the practice is common throughout parts of the Midwest and might have originated in Des Moines, Iowa.

If your child is looking for some jokes this spooky season, click here for some ideas. Many homeowners in the St. Louis region should expect some trick-or-treaters, and possibly some standup comedy, between 5 and 9 p.m. Monday.