A watermill is a structure that uses a water wheel or turbine to drive a mechanical process such as flour, lumber or textile production, or metal shaping (rolling, grinding or wire drawing).
In ancient Mesopotamia, irrigation machines are referred to in Babylonian inscriptions, but without details on their construction, suggesting that water power had been harnessed for irrigation purposes. The primitive use of water-rotated wheels may date back to Sumerian times, with references to a "Month for raising the Water Wheels", though it is not known whether these wheels were turned by the flow of a river.
The earliest clear evidence for the use of water for powering mills dates back to the ancient Greco-Roman world. The British historian of technology M. J. T. Lewis has shown that portions of Philo of Byzantium's mechanical treatise, which describe water wheels, and which have been previously regarded as later Arabic interpolations, actually date back to the Greek 3rd century BC original. The Greek author Strabo mentions in his Geography another early watermill, located near the palace of king Mithradates VI Eupator (r. 120-63 BC) at Cabira. In the early 1st century BC, the Greek epigrammatist Antipater of Thessalonica made the first clear reference to the waterwheel which he praised for its use in grinding grain and the reduction of human labour.
By the early 20th century, availability of cheap electrical energy made the water mill obsolete in developed countries although some smaller rural mills continued to operate commercially into the 1960s.
The rural communities of Trás-os-Montes still use community mills although many are obsolete and abandoned to the fate and the elements.