 During the ninth century the town had flourished since the establishment of the episcopal headquarters in San Martiño de Mondoñedo.At the time of Ferdinand and Isabella, Foz kept certain privileges and exemptions as a result of its commercial importance.During the sixteenth and seventeenth Foz had a major port and one of the three most important shipyards in Galicia.