Lusitanian territory, massacring the population, including women. In order to escape the horrors, some of these women disfigured themselves, cutting their hair and throwing the tresses into springs. When thirsty soldiers went to one of these fountains, they discovered a hair in the water, referring to the area as soup of hair. Title of Afife was held in the hands of Mendo Pais (one of the sons of the Count of Tui) and, later, one of his nephews, Paio Soares, before being transferred to the Monastery of São Salvador da Torre (at its foundation). The subsequent fate of the holdings of the monastery are not concrete, since the monastery went into ruins and its possessions were appropriated by others around the 10th century, and after the Moorish invasions of Almançor. The monastery was rebuilt after the 11th century, by the descendant of Paio Vermundes, presbyter Ordonho Enes. The founding of the Monastery of São João de Cabanas occurred in the middle of the 6th century. Friar Leão de São Tomaz, a Benedictine monk, who lived during the era of Martin of Braga, suggested that this monastery located in the territory of Afife was established by the cleric. Some historians suggest that these declarations were premature, noting the construction of the monastery around 564, while other documents suggest 602. A century later, the monastery was a rich centre of religion in the region: "...all the lands of the mount of Âncora and waters to the river until the sea, and in addition to the river, also called Âncora, to the east which included three miles of land, and another three to the west, which had tithes, covenants and rents." The founder of the monastery left the institution in a favourable condition, lasting the reigns of Sebastian and Philip I, acting as a religious centre for convalescence and aid of the sick. But, judicial actions by powerful peoples, suggest that this institution followed the Order of Christ. The 1258 Inquirições (Inqueries) confirm most of these facts, and also describe the existence of two villages in the , Affifi and Vila Meiãa, and several houses associated with the Monastery of São Salvador da Torre. During this epoch, the two villages and parish church were owned partially by the Crown, but the creation of the municipality of Viana do Castelo would change this. King Afonso III of Portugal approached the Bishop of Tui to