Bleary-eyed readers scanning page two of the Boston Morning Post on March 23, 1839, may have barely noticed the linguistic oddity buried in the blizzard of ink in the second column. At the end of a short, throwaway item taking sarcastic jabs at a Providence newspaper stood the abbreviation “o.k.” next to the words “all correct.” Much like the modern-day world filled with text-friendly shortcuts such as LOL and OMG, an abbreviation craze swept nineteenth-century America, although with a twist. In an attempt at humor, young, educated elites deliberately misspelled words and abbreviated them for slang. For example, “KG” stood for “know go,” the incorrect spelling of “no go.” The joke is lost on us today, but it was LOL funny in the 1800s.

So when “o.k.” appeared in print, it was intended to be the shortening of “oll korrect,” the humorous misspelling of “all correct.” According to Allan Metcalf, author of OK: The Improbable Story of America’s Greatest Word, Boston Morning Post editor Charles Gordon Greene, who often wrote witticisms and took shots at other broadsheets in print, was likely the author of the attack on the Providence newspaper and thus the man who gave birth to OK.

OK reappeared in another Boston Morning Post article three days later, and it very slowly seeped into the American vernacular during 1839. By the end of the year, it had showed up in the Boston Evening Transcript, New York Evening Tattler and the Philadelphia Gazette. The spotlight of the following year’s presidential campaign, however, set OK on the path to linguistic stardom.

In 1840, incumbent Martin Van Buren faced a reelection campaign against William Henry Harrison, the war hero popularized by the slogans “Tippecanoe and Tyler Too” and “Log Cabin and Hard Cider.” Van Buren’s supporters came up with their own campaign rallying cry—“O.K.” Van Buren was born and bred in the upstate New York town of Kinderhook, and he developed the nickname “Old Kinderhook.” The Democratic president’s supporters began to form “O.K. Clubs” around the country. As Metcalf writes, “OK now could have a double meaning: Old Kinderhook was all correct.”

Harrison’s opponents also began to adopt OK, but used it in a much different manner. They used the expression to cudgel Van Buren’s mentor, Andrew Jackson. The editor of the New York Morning Herald wrote that Jackson was such a terrible speller that he believed “ole kurrek” was the proper spelling of “all correct” and signed “O.K.” on his presidential papers to indicate his approval. The myth spread far and wide.

Ultimately, the American voters didn’t believe that Van Buren was OK. Harrison won the 1840 election, but so did OK. The expression started to appear in everyday speech, and in 1864 it showed up in the Slang Dictionary of Vulgar Words. It popped up periodically in popular culture as well. The OK Corral, Livery and Feed Stable in Tombstone, Arizona, became world-famous in 1881 after the legendary gunfight that included Doc Holliday and the three Earp brothers. In the 1943 musical “Oklahoma!,” Rogers and Hammerstein declared that the state was “O.K.,” and the 1967 Thomas Harris book “I’m OK, You’re OK” was one of the most popular self-help guides ever written.

While OK became part of the popular lexicon, its origins were disputed for more than a century. Some linguists pointed to Van Buren and Jackson. Others thought it was based on the manufacturer of a popular army biscuit, Orrin Kendall, or a Choctaw chief named Old Keokuk. President Woodrow Wilson thought it evolved from a Choctaw word that he spelled “okeh.” It wasn’t until American linguist Allen Walker Read, a Columbia University English professor, uncovered OK’s true origins in the 1960s, however, that it could be traced back to a newspaper editor’s off-hand quip in 1839.