As far back as the late 19th century, you could open a newspaper during autumn and spot the phrase October surprise. But it wouldn’t have made front-page headlines—or had anything to do with an upcoming election.

“Our October surprise sale is all that it’s [sic] name implies,” a Hale Bros. advertisement boasted in an 1888 edition of The Sacramento Bee. “Our SURPRISE VALUES in SILKS, PLUSHES, and VELVETS are worth noting.”

Merriam-Webster reports that October surprises were originally annual sales at department stores and other clothing shops. A 1908 ad in Pennsylvania’s Harrisburg Daily Independent promised that customers would be “surprised” at the “splendid quality and handsome style” of tailor-made suits for just $16.50; and The Style Shop in Eugene, Oregon, announced its “October Surprise Hat Sale” to Morning Register readers in 1917.

As the 20th century progressed, people began using the phrase in other contexts, too. When the Chicago Cubs hired Leo Durocher as manager in 1965, the Chicago Tribune called it an “October surprise.” Four years later, The Pittsburgh Press published an article about Pennsylvania’s mercurial fall weather under the headline “October Surprises.”

By 1980, the phrase could apply to just about any unexpected occurrence in October—and that’s when it entered the political sphere in a big way. According to Smithsonian, the person who popularized it was Ronald Reagan’s campaign manager William Casey (whom Reagan later appointed as director of the CIA). Reagan was running for president against Democratic incumbent Jimmy Carter, and his camp was worried that Carter’s team was cooking up some newsworthy event that could sway voters late in the race.

“Reagan and his aides … expect [Carter] to pull what they call ‘the October surprise,’ meaning that shortly before Election Day, he will inflate the importance of some overseas event in an attempt to rally the country around him,” TIME wrote on July 28, 1980.

“Some overseas event” wasn’t exactly an abstract idea. On November 4, 1979, several dozen Americans had been taken hostage by Iranian students at the American embassy in Tehran, and Carter had spent months trying—and failing—to negotiate their release. If he succeeded just weeks before the election, the victory could convince skeptical voters that he was, in fact, an effective leader who deserved a second term. But Carter never did pull off that particular October surprise, and Reagan won the election. The hostages were set free on the day of Reagan’s inauguration, which gave rise to conspiracy theories that claimed he had colluded with Iranian authorities to postpone the release until after Election Day.

Ever since then, the term October surprise has cropped up in media coverage surrounding presidential elections. Sometimes, political pundits are discussing an actual October surprise—like the news of George Bush’s 1976 arrest for drunk driving, which broke right before the 2000 election—that they think might influence voters. Other times, they’re just speculating about what potential October surprises could come to pass.

[h/t Merriam-Webster]