At the start of the 8th century, Samarkand came under Arab control. Under Abbasid rule, the legend goes, the secret of papermaking was learned from two Chinese prisoners in 751. This led to the first paper mill in the Islamic world being founded in Samarkand. The invention then spread to the rest of the Islamic world, and from there to Europe.