From ancient times there were many obstructions across the Thames, for fish-pounds and millers' weirs. They are referred to by Asserius Menevensis in the ninth century and Magna Carta (1215) states that "weirs, for the time to come, shall be demolished in the Thames and Medway, except on the sea coast." It appears this never happened. In the Middle Ages, the fall on the river in its middle and upper sections was used to drive watermills for the production of flour and paper and various other purposes such as metal-beating. This involved the construction of weirs in order to divert water into the mills. The weirs, however, presented an obstacle to navigation and to solve this problem locks were built alongside the weirs to enable boats to be moved between levels.