In the early Middle Ages the Piotrków region was part of the province of Łęczyca of Poland ruled by the Piast dynasty. In c1264 it became part of a separate principality. The foundation of the city and its development were connected with its geographical position and the advantageous arrangement of the roads linking the provinces of Poland in Piast times. At first, a market town and a place of the princes' tribunals (in the 13th and 15th centuries), Piotrków became an administrative centre (the capital of the district since 1418), and in later centuries it also became an important political centre in Poland. The first record of Piotrków is in a document issued in 1217 by Polish monarch Leszek I the White, where there is a mention of the duke's tribunal held "in Petrecoue". Mediaeval Piotrków was a trading place on the trade routes from Pomerania to Russia and Hungary, and later from Masovia to Silesia.