The Saxon villages appeared when the Kings of Hungary settled German colonists in the area in the 12th century. Because of the constant threat of the Ottoman Empire and Tatar invasions, they built fortifications centered around the main church of the village. In many cases, the church is situated on a hilltop, an easily defendable position. The most important towns were fully fortified. Most of the churches are built in Romanesque or late Gothic style and some also include Baroque elements. The churches were used as defensive towers as well as essential facilities for the villages like a storage for valuable goods, a safe house, and a school. These walled churches were able to function as a small village when needed.