positioned where the ('chapel of Magdalena') is today. Not until the late 9th or early 10th century was a church built on the site of today's basilica, where the relics of Wendelin were taken during the 11th century and to which people make a pilgrimage on St. Wendel's day in October. At the same time, the Wendel's Market developed, a central market for the area for cattle, clothing, and everyday utensils. Noble families and the clergy settled around the church. Castle, farm, and church gradually grew together in the 14th century. Until the latter half of the 10th century, St. Wendel was an important outpost of Verdun. In 1326/28 the prince elector and Archbishop Balduin of Luxembourg from Trier bought the castle and the village of St. Wendel. He was trying to suppress the influence of Lorraine on the Rhine area. Through this purchase the village soon developed into a medieval town. Jakomin von Monkler became the first magistrate. As a representative of the prince elector, he had a new castle erected. In addition, he counseled Archbishop Balduin to create a new pilgrimage church. In 1332, he bought the city certificate from emperor Ludwig IV, gaining permanent revenues. His successor Werner von Falkenstein had a wall erected around the city in 1388. At this time about 500 people lived in St. Wendel. While the ('fruit market' – the area around the basilica) was a part of the town for the noble and clerical people in the 14th century, it became the central market place in the 15th century. Middle class and laborers settled on the former farms of noblemen. The guilds developed, gaining rights in the city administration through their jurors. In 1455 the municipal foundation, , was erected, and a bit later the town hall was built. By the middle of the 15th century the number of residents had climbed to 700. In 1591 a huge part of the town was destroyed by fire. The residents had just started re-building the town when requisitions and contributions (payments to the occupation army) during the Thirty Years' War (1618–1648) almost drove the town into financial collapse. During the Third Anglo-Dutch War (1672–1697) all buildings except for a few were burned down in 1677. The city wall was partly destroyed, and the prince elector's castle was devastated. During the War of the Spanish Succession (1701–1714) the city was occupied and despoiled again.