In 1718 the London inventor James Puckle patented a mechanical weapon called the Puckle Gun. It was a tripod-mounted, single-barrelled flintlock gun fitted with a revolving cylinder, and could fire nine shots per minute. At the time, the standard soldier's musket could be loaded and fired three times per minute.
However, the invention didn't attract investors and was never mass-produced; it was nearly a century before a similar principle was used to produce multi-barrel handguns.
Puckle actually developed two versions. One fired round bullets, for use against Christian enemies. The other was designed to be used against the Muslim Turks, and fired square bullets, which he thought would cause larger and more painful wounds.