In the late 12th century and early 13th century a small settlement of gold miners was founded on the slopes of Mount St. Nicholas ("Góra św. Mikołaja"), located at the shores of the Kaczawa river. The village grew rapidly and in 1211 it was documented as "Aurum" and vested with town rights according to Magdeburg law by the Piast duke Henry I the Bearded, the first city throughout then-fragmented Poland and plausibly the first Silesian town with German institutions and German settlers. Henry I financed the construction of the St. Mary's Church, which was later expanded and is now one of the town's landmarks. In the 13th century a Hospitaller and Franciscan monastery were founded in the town, which thus became one of the important cultural and religious centres of the region. During the Mongol invasion of Poland, in 1241 many of the miners took part in the Battle of Legnica, where most of them died, but the mining quickly recovered.