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).