Responding here, as I live in Martinez CA. We stick to our guns as to inventing the drink. While others may maliciously claim ownership, they are merely falsehoods. This particular factoid was located on the Interweb and as any reasonable person should know, if it's on the Internet, it has to be true. So there! (The part about SF is simply creative backstory)
How the Martini was Named
There are as many storied origins of the martini as there are ways to make one.
Some believe that a New York bartender named Martini invented the drink in 1912 while some believe it to be invented in San Francisco by Professor Jerry Thomas around 1850 for a miner on his way to Martinez, California. Lore says that a miner placed a nugget of gold on Jerry’s bar and challenged him to concoct something special. The result was the Martinez, the said prototype of the Martini. The Martinez was first published in The Bartenders Guide in 1887, the first bartenders manual of its kind and was made with a full wine glass of sweet vermouth, one (1) ounce of Old Tom Gin, some bitters and a dash or two of maraschino. In those days, if the drink weren’t sweet enough, gum syrup was added.
The citizenry of Martinez, California believe that the martini was first concocted right there in Martinez by a bartender named Julio Richelieu in 1870. They claim that a miner became disenchanted with the whisky Richelieu served him. After all, he paid for the whisky with a pouch of gold. So, Richelieu concocted a glass of gin, vermouth, orange, bitters and an olive to make up for the difference. Thus was born the Martinez.