In the mid-11th century, a new gord was established on the Biała river. It was a royal property, which in the late 11th or early 12th century was handed over to the Tyniec Benedictine Abbey. The name Tarnów, with a different spelling, was for the first time mentioned in a document of Papal legate, Cardinal Gilles de Paris (1124). The first documented mention of Tarnów occurs in the year 1309, when a list of miracles of Kinga of Poland specifies a woman named Marta, who was resident of the settlement. In 1327, a knight named Spicymir (Leliwa coat of arms) purchased a village of Tarnów Wielki, and three years later, founded his own private town. On 7 March 1330, King Władysław I the Elbow-high granted Magdeburg rights to Tarnów. In the same year, construction of a castle on the St. Martin Hill was completed by Castellan of Kraków, Spycimir Leliwita of Leliwa coat of arms (its ruins can still be seen). Tarnów remained in the hands of the Leliwa family, out of which in the 15th century the Tarnowski family emerged. In the 14th century, numerous German settlers immigrated from Kraków and Nowy Sącz (see Walddeutsche, Ostsiedlung). During the 17th century Scottish immigrants began to come in large numbers. In 1528 the exiled King of Hungary János Szapolyai lived in the town. The town prospered during the Polish Golden Age, when it belonged to Hetman Jan Tarnowski (1488–1561). In the mid-16th century, its population was app. 1,200, with 200 houses located within town's defensive wall (the wall itself had been built in the mid-15th century, and expanded in the early 16th century). In 1467, the waterworks and sewage systems were completed, with large cisterns filled with drinking water built in the main market square. In the 16th century, during the period known as the Polish Golden Age, Tarnów had a school, a synagogue, a Calvinist prayer house, Roman Catholic churches, and up to twelve guilds. After the death of Jan Tarnowski (16 May 1561), Italian sculptor Jan Maria Padovano began creating one of the most beautiful examples of Renaissance headstones in the Polish-Lithuanian Commonwealth.