During the 9th to 11th centuries, water power was harnessed for the first time. Small waterwheels with a horizontal wheel began to appear everywhere, releasing peasants from the hard task of grinding grain by hand. From the 12th century on, water power was used in metalworking and other crafts. The miners in the Pyrenees extracted iron ore that was purified in the forges. The excellent quality of Catalan iron and steel enabled improvements to be made to tools of all kinds, especially farm implements and military weapons.