Did ‘alakazam’ magically appear out of the thin air?
I doubt it. But when did alakazam enter English, where did it come from, and who first used it?
I vaguely recall the TV magic show The Magic Land of Allakazam (1960–1964) from my Texas childhood, and I’ve always assumed that the incantation “alakazam” (like “abracadabra”) was much older than that. A Google Books search for alakazam, however, turns up only a handful of matches from before the 1950s, and none earlier than 1919 (in The American Lumberman).
A query about abracadabra and alakazam posted on Reddit’s AskHistorians page (not by me) yielded a fair amount of information on the former but very little on the latter. A poster there noted that Merriam-Webster gives a “first known use” date of 1937 for alakazam. My copy of the compact edition of the OED (a 1985 reprint of the 1971 edition) doesn’t list the word at all, and neither does Oxford Dictionaries Online.
Hence my questions above.
Solution 1:
OED Online offers a comprehensive etymology for alakazam. It says that it is apparently an arbitrary formation, invented to sound like a word in an unspecified foreign language, with the intention of creating an air of exoticism and mystery.
For the magical exclamation, OED says that it is perhaps approximately suggested by abracadabra.
The earliest form of the word is alagazam and it is suggested by the following (facetious) use in a street name (in the Daily evening bulletin, San Francisco, 1881):
Camp Capitola. Description of a New Seaside Resort in Santa Cruz County... The party who laid out the streets..gave vent to his facetious bent in naming them. Glancing at the names..are seen Fishbone avenue, Alagazam street, Rat Tail alley and Soda Water avenue.
OED also gives early examples in which this expression (in various spellings) is used facetiously with relation to the use of foreign words and phrases in English linguistic contexts with the intention to impress or to create an air of sophistication:
At this point the conversation was interrupted by the tones of a deep, rich bass voice belonging to a gentleman, who sat directly behind the alagazam idiot: ‘Asinus, asini, asiniorum’.
1884 Hawaiian Monthly May 119/2
I ain't had a square meal sence. Been fillin' up on Charley horse rusies, sooflay de allakazam, an' all them French dishes.
1896 N.Y. Tribune 24 May 17/6
OED also adds that the form Alagazam is also attested earlier in popular music, earliest as the title of composition first released as a ragtime piano score and subsequently published with lyrics:
The theme and title of this composition suggested itself to the writer during a trip to the South where he saw a colored regiment, who, while marking time during drill..were uttering a peculiar refrain which sounded like—Alagazam! Alagazam! Alagazam! Zam! Zam!
1902 A. Holzmann ‘Alagazam!’ Cake Walk, March and Two Step 3
There are also two other examples:
Zam Zam Zam was the title they gave him Zam Zam Zam our mighty Alagazam. With the explanation given by Holzmann for the title of his piece compare the later composition by Harry von Tilzer and Andrew B. Sterling entitled Alagazam to the Music of the Band (1915). With forms showing apparently arbitrary variation in the final syllable (as alakazoop, alakazoo, etc.), compare the following comic song, where a different alteration of Alakazam (apparently presented as though the name of a foreign country, state, or city) features in each successive verse (The Countess of Alagazoop, The Countess of Alagazip, etc.).
1903 A. Holzmann Alagazam. Song. 5
They christen'd a girl somewhere in the world, The Countess of Alagazam. It has been suggested that the expression arose in the medicine shows that toured America in the late 19th and early 20th centuries, although contemporary evidence to confirm this appears to be lacking. - 1904 R. Cole Countess of Alagazam 3
1904 R. Cole Countess of Alagazam 3
The earliest example listed in OED for alakazam used as an exclamation imparting supposed magical power, as when performing a trick is from 1902 (as part of an extended magical formula):
It was a wishing-spell, and whoever repeated it could be anywhere or do anything he desired... It read like this: ‘Alakazam Bazazza Ki! Hickory Dickory Dock. Omega Om Opeeka Pi? O Donnerwetter Hoch!’
1902 Sun (Baltimore) 30 Mar. 12/1
There is also another possible origin from Arabic but there isn't much evidence.
In the book Haggard Hawks and Paltry Poltroons: The Origins of English in Ten Words (by Paul Anthony Jones), it is mentioned that there is a popular folk etymology claiming that the word is somehow derived from the Arabic al qasam, meaning 'the oath', in fact the true origin of alakazam is considered a mystery.
It is also mentioned in the book Magic Words: A Dictionary (By Craig Conley):
This word has its roots in an Arabic incantation.133 A similar-sounding Arabic phrase, Al Qasam, means "oath."
Because Alakazam is a proper name, it may have originally been used as a magic word invoking the powers of a particular person named Alakazam.134
Alakazam has also been traced to a Hindu word meaning "flawless" and a spell intended "to stave off pain while performing some great act of physical endurance."135
133 John Skoyles and Dorion Saga, Up Ann Dragons (2002)
134 Terry O'Connor, "Word for Word," PlateauPress.com (2004)
135 TheMagicCafe.com (2005)
The book Magic Words: A Dictionary offers much more details about alakazam and all other magic words/phrases. It also gives an explanation about the word Ala which is part of Alakazam and some other magic words.
Ala not only appears in several magic words (like alakazam, alakazee, a-la peanut butter sandwiches, and alikazoola) but also can be a magic word on its own. Ala is the name of a dangerous demon that envelopes people, mentioned in antiquated Mesopotamian magical texts.
Solution 2:
I have some notes to supplement ermanen's very well-researched and wide-ranging answer to this question. They don't constitute a freestanding answer, in my opinion, but they do offer additional context for several of ermanen's quotations, as well as a few new reference points.
Early occurrences of 'alakazam and 'allakazam'
The earliest occurrences of alakazam in the Library of Congress's database of U.S. newspapers is this excerpt from an anecdote originally in the Indianapolis [Indiana] Journal, reprinted in the Salt Lake [City, Utah] Herald (June 5, 1896):
"It's been two year now," said he [a suddenly wealthy hardscrabble farmer], "sence we struck gas on the farm, and I ain't had a quare meal sence. Been fillin' up on Charley horse rusies, soofay de alakazam, an' all them French dishes ever sence. That's what comes of marryin' a woman who believes in keepin' up with the percession when you got the price, as she puts it.
It appears, though, that this instance may have been a typographical error by the Herald's staff, since five other newspapers that reprinted the same Indianapolis Journal article used the spelling "allakazam" (and two words earlier the spelling "sooflay"): the New York Tribune (May 24, 1896) [this is the version cited in ermanen's answer], the Cottonwood [Idaho] Report (July 3, 1896), the Red Lodge [Montana] Picket (July 4, 1896), the Pascagoula [Mississippi] Democrat-Star (August 7, 1896), and the [Honolulu, Hawaii] Independent (November 10, 1896). Indeed, the original Indianapolis Journal article titled "A Wild Revel" (May 19, 1896), which is preserved in the Hoosier State Chronicles newspaper database, spells the word allakazam. This is the earliest instance of the double-l spelling of the word that I've been able to find—and the next unique instance of allakazam that the Library of Congress database finds doesn't occur until 1918, when it appears as the fictitious name of a Middle East city governed by a Grand Vizier, in a story in the Topeka [Kansas] State Journal.
The same early instance in which alakazam is used as part of a magic incantation that ermanen's answer reports as appearing in the Baltimore [Maryland] Sun of March 30, 1902, also appears on the same date in the Salt Lake Herald; it's from a story by Walt McDougall titled "Little Howard Megargee Finds a Magic Charm That Cures His Dying Father and Turns Their Enchanted Cat Into a Lovely Princess."
However, an Elephind newspaper database search turns up a substantially earlier instance of the word used repeatedly as an expression of great enthusiasm. From "Among the White Tents," first published in the Chicago [Illinois] Herald Tribune and reprinted in the New York Clipper (July 14, 1888):
We're goin' to de cirkis! / Alakazam! / To see de ringtailed monkey / Ride on de spotted donkey! / Oh , golly! aint dat hunkey? Alakazam!
Jist like Its on de show bill! / Alakazam! / De lady an' de cannon! / De Japanezers fannin', / An' on dere chins a stan'n'! / Alakazam!
An' all wots in de street p'rade! / Alakazam! / De clown! say, don't dey buzz him / When dat dere trick mule 'does him'? / You bet I wish I wuz him! / Alakazam!
De lemonade and peanuts! / Alakazam! / Under de canvas? Oh, no! / Right trew de big door WE go! / An' den! we whitles 'you know'! / Alakazam!
The newspaper item says that the poem is "dedicated to Col Geo. O. Starr, Barnum & Bailey's newspaper man, at the free circus performance for the newsboys of Chicago." Notable by its absence from the poem is any reference to a magician or to magic tricks.
Early occurrences of 'alagazam' and 'allagazam'
A Google Books search for "alagazam" produces one very early match (also cited in ermanen's answer). From "Whimsicalities" in The Hawaiian Monthly (May 1884):
At this point the conversation [in which one of the participants was more than liberal in sprinkling his speech with pretentious words out of Latin and Italian] was interrupted by the tones of a deep, rich bass voice belonging to a gentleman who sat directly behind the alagazam idiot:
"Asinus, asini, asiniorum."
The intended sense of alagazam here is difficult to pin down. It could mean "perfect" (as in "perfect idiot"), or it could mean any number of other things that are less flattering as stand-alone adjectives.
An Elephind search yields this match for alagazam from "A Los Angeles Idyl" in the Los Angeles [California] Herald (March 11, 1888):
When clang, clang, clang, rip it and bang. / Bingbang, bingbang, alagazam, / Twist us double, Ring us about. / Kling, kling, klingklang, kerflop, kerslam, / Clang, clang, clang, clang, hoop it and lam. / Yank our tongues out, give us a bout, / Bing, bing, bingbang, bif, bif, kerflam, / Clang, clang, clang, clang, rattle and ram, / Shiver our timbers and knock us out, / Rang the big and the small bell / Of the quaint, old cathedral.
The instance here is evidently nonsensical or onomatapoeic, but nevertheless indicates some familiarity with the sound, if not the sense, of the word.
The earliest instance of alagazam (or allagazam) in the Library of Congress database is this one from the [Phoenix] Arizona Republican (October 21, 1897), mentioning what it calls a "four-in-hand machine song" titled "Al-la-ga-zam" as part of an evening of musical variety entertainment:
The introduction of excellent singing specialties in the second and third acts of "Tony the Convict," on Friday night, will render the performance doubly enjoyable. Miss May Phillips will sing "Sally Warner," on of the latest eastern hits; H. Clay Parker will be heard in "coon" melodies; the four-in-hand machine song, "Al-la-ga-zam" will create a furore, and Fred Mussey's character songs will take the house by storm. Included in his repertoire will be a new topical song, "When Some One Pulls the String," with some "warm" extra verses by a local author, and a plaintive love ditty, "What Would Duckey Do if Lovey Died?" The performance will be one of the most entertaining ever seen in Phoenix.
The interesting thing here is that the song "Al-la-ga-zam" is being performed four to five years before Abe Holtzmann published his hugely popular song "Alagazam" (cited in ermanen's answer). Most of the matches for alagazam in the Library of Congress database involve Holtzmann's song, which was regularly performed at band concerts, as a march, a rag-time, a two-step, or a "cake walk."
A second instance of alagazam before 1902 appears in the Seattle [Washington] Post-Intelligencer (February 4, 1900), in the context of a joke-name for a Michigan town (probably based on Kalamazoo, Michigan):
The organized bodies which always attend the national conventions will be bitterly disappointed in the [Philadelphia] convention hall arrangements. Their favorite performance i to march into the hall headed by a brass band with banners flying. There won't be room at Philadelphia for any brass band except the one hired to fill in pauses between the speeches. and the McKinley Club of Alagazam, Mich., will find a cold reception when it tries to enter the convention hall in a body.
Since Alagazam is not an inherently funnier word than Kalamazoo, I suspect that the decision to use it in this story reflects some other association that alagazam already (in 1900) has in readers' minds.
Also difficult to explain is this entry in Louise Pound, "Word-List from Nebraska (III)," in Dialect Notes, volume 4, part 4 (1916):
alagazam, adj. Fine, excellent. "The jelly was alagazam." See also elegazam, below.
...
elegazam, adj. Variant of alagazam, above.
Along the same lines, H.L. Mencken, American Language Supplement 2 (1948) notes that among textile workers of that day, elegazam meant "perfect work."