A cotton ginβmeaning "cotton engine"βis a machine that quickly and easily separates cotton fibers from their seeds, enabling much greater productivity than manual cotton separation. The separated seeds may be used to grow more cotton or to produce cottonseed oil. Handheld roller gins had been used in the Indian subcontinent since at earliest 500 and later in other regions. The Indian worm-gear roller gin was invented sometime around the 16th century and has, according to Lakwete, remained virtually unchanged up to the present time. A modern mechanical cotton gin was created by American inventor Eli Whitney in 1793 and patented in 1794.
Whitney's gin used a combination of a wire screen and small wire hooks to pull the cotton through, while brushes continuously removed the loose cotton lint to prevent jams. It revolutionized the cotton industry in the United States by making cotton farming more profitable and efficient, and consequently led to the growth of slavery in the Southern United States due to dependence on slaves for harvesting. The invention has thus been identified as an inadvertent contributing factor to the outbreak of the American Civil War. Modern automated cotton gins use multiple powered cleaning cylinders and saws, and offer far higher productivity than their hand-powered precursors.