Back then, slots were often confined to bars and sometimes paid out prizes instead of coins to get around anti-gambling laws. It was invented by Charles Fey in San Francisco around 1896.
The first gambling machine that could indisputably be called a slot machine was a simple, three-reel game titled Liberty Bell. Slots by Michael Shackleford aka Wizard of Odds