The first documentation of the cotton gin by contemporary scholars is found in the fifth century AD, in the form of Buddhist paintings depicting a single-roller gin in the Ajanta Caves in western India.