Masked children roaming door-to-door, begging for treats. Well-lubricated adults dressing up for costume parties. Sounds like a normal Halloween—except it wasn’t. Less than a century ago, this was Thanksgiving. It seems as bizarre as decking the halls on the Fourth of July, but it’s true: For decades before World War II, Turkey Day was the day for putting on false faces.

How did Thanksgiving take such a detour? According to the 1873 book Old New England Traits, in the early 19th century, poorer Massachusetts residents started knocking on doors on the holiday’s eve, begging, “Something for Thanksgiving?” As a (bad) joke, well-to-do children began dressing in tattered clothes and doing the same.

The costume idea caught on. When Abraham Lincoln proclaimed Thanksgiving a holiday in 1863, towns from Juneau, Alaska, to Tampa, Florida, began marking the date with masquerade balls. The Tombstone Prospector took note of 1890 costume prize-winner Miss Will Sneed, dressed as a gold mine “in a gown that would inspire even the most dejected prospector to try again.”

Not to be outdone, New York City brought the trend to the next level. Officials staged a regal annual parade to commemorate both Thanksgiving and the British evacuation of New York. Immigrants spoofed the stuffy, uniformed military companies by putting on their own show. Working-class men poured out of saloons and marched through streets blowing tin fish horns and beating drums. They called themselves Fantasticals and dressed garishly as clowns, politicians, and celebrities, like Buffalo Bill. Kids raided their parents’ wardrobes to join in the fun: Boys paraded in high heels and old evening gowns, as girls marched in over-size Prince Albert coats. Sensing a business opportunity, stores started selling nightmare-inducing papier-mâché masks before the fete. Children prowled the streets on Thanksgiving morning, ringing doorbells to ask strangers, “Anything for Thanksgiving?” So many kids were sporting tattered clothes and darkened faces on Thanksgiving that by the 1900s, it was known as Ragamuffin Day.

Fantasticals died out by the turn of the 20th century, but “Thanksgiving maskers” flourished—not to everyone’s amusement. “The practice of ringing all the doorbells and demanding backsheesh is long past a joke,” The New York Times complained in 1903. “This must be a foreign innovation,” intoned a 1909 Sons of Daniel Boone hand-book, “for no self-respecting American boy would think of parading the streets dressed up like a ragamuffin and begging a cent from each passer-by.” Sadistic New Yorkers threw stove-heated coins known as “red pennies” onto the street and howled in laughter as kids burned their fingers.

Red pennies failed to stop the ragamuffins, but the Great Depression did. Everybody had empty pockets by the 1930s, and the question “Anything for Thanksgiving?” was answered with “No.” At the urging of New York’s schools superintendent, civic organizations organized costume contests and parades to discourage kids from “going ragamuffin’” door-to-door.

It worked. Thanksgiving reverted to an austere, family-oriented holiday, and by 1950, trick-or-treating had shifted to a less sacred day—Halloween. The change left grown-up ragamuffins nostalgic, even about red pennies. “I remember how my fingers got blistered,” patrolman Leo Carey recalled to The New York Times in 1931. “But they don’t have any real fun like that any more.”