In 1150 the valley, in which Le Locle would later be built, was granted by Renaud and William Valanginian to the abbey of Fontaine-André. In 1360, John II of Aarberg, the Lord of Valanginian, received Le Locle as a fief from Count Louis of Neuchatel. The heavily wooded part of the Jura Mountains around Le Locle, were cleared by colonists who later received the status of free peasants. These first free farmers received a charter in 1372 which codified their rights and freedoms. At the beginning of the 15th century, this charter was reconfirmed during the foundation of the Mairie or town government. Beginning in the 14th century Le Locle and La Sagne formed a parish together. The church of Mary Magdalene in Le Locle was built in 1351.