Maxim gun
The first successful rapid-fire firearm is the Gatling Gun, invented by Richard Gatling and fielded by the Union forces during the American Civil War in the 1860s. The Maxim gun, the first machine gun came shortly thereafter, developed in 1885 by Hiram Maxim.