Radom's original settlement dates back to the 8th–9th century. It was an early medieval town in the valley of the Mleczna River (on the approximate site of present-day "Old Town"). In the second half of the 10th century, it became a gord, called "Piotrówka", which was protected by a rampart and a moat. Due to convenient location on the edge of a large wilderness, and its proximity to the border of Lesser Poland and Mazovia, Radom quickly emerged as an important administrative center of the early Kingdom of Poland. "Piotrówka" was probably named after St. Peter church, which in 1222 was placed under the authority of a Benedictine Abbey in nearby Sieciechów. The church no longer exists; the oldest still-extant church in Radom is St. Wacław, founded in the 13th century by Prince of Sandomierz Leszek I the White. The first documented mention of Radom comes from the year 1155, in a bull of Pope Adrian IV ("villam iuxta Rado, que vocatur Zlauno", or "a village near Radom, called Sławno"). By 1233, Radom was the seat of a castellan. The name of the city comes from the ancient Slavic given name "Radomir", and Radom means a "gord, which belongs to Radomir".