 The origin of the temple, that relate to the church itself, is dated to the Suebi-Visigothic period, although it incorporates older elements dating to the Roman period.Other elements also relate it to Asturian-Leonese period, prior to the prevailing Romanesque reconstruction.According to legend, Peter of Rates came to the future Portuguese territory in the year 44 AD invited by Saint James the Great, one of Jesus's apostles.