RICHMOND, Va. (WRIC) — The day after Thanksgiving — or sometimes, mere hours after the Thursday night meal is over — thousands of Americans head to their favorite mall or online retailer to scoop up the best deals on Black Friday. But do you know how the Friday after Thanksgiving got the name “Black Friday” in the first place? It turns out there are actually a few explanations for the name.

According to Business Insider, the first usage of the term “Black Friday” was all the way back in 1869, when investors Jay Gould and Jim Fisk tried to corner the market on gold by buying up as much as they could and then raising the price. However, President Ulysses S. Grant intervened — on a Friday — causing not only their plan to fail but for the stock market to plummet. Thousands of Americans went bankrupt, foreign trade stopped, and corn and wheat dropped in value, impacting hundreds of farmers.

However, this first “Black Friday” didn’t take place the day after Thanksgiving, but instead on Friday, Sept. 24.

Almost a century later, police officers in Philadelphia in the 1960s began to use the phrase to describe the post-Thanksgiving shopping rush, according to Britannica. Large crowds of suburban tourists would come to the city after Thanksgiving to shop and attend the weekend Army-Navy football game, causing police officers to pick up longer shifts to deal with a citywide increase in car crashes and shoplifting.

The term gained nationwide popularity in the 1980s after businesses started using the term to refer to the post-Thanksgiving shopping frenzy. This time, “Black Friday” was a play on an old system of accountants marketing negative earnings in red ink and positive earnings in black ink, according to Business Insider. If a business was operating at a loss — or “in the red” — and they turned a profit in the post-Thanksgiving shopping season, they would be back “in the black.”

However, according to Britannica, this narrative isn’t entirely true. Black Friday is a huge shopping day, but most stores actually see their largest sales of the year on the Saturday before Christmas.