The first practical windmills were built in eastern Persia, with a vertical shaft and sails that caught the strong seasonal wind. They were first used to pump water and then adapted to grind grain.
Windmills appeared in Europe in the 12th century, where they became a common source of mechanical power.