The Gatling gun was first used in warfare during the American Civil War. Twelve of the guns were purchased personally by Union commanders and used in the trenches during the Siege of Petersburg, Virginia (June 1864—April 1865). Eight other Gatling guns were fitted on gunboats. The gun was not accepted by the American Army until 1866 when a sales representative of the manufacturing company demonstrated it in combat.