西哥特王国
The church appears to have gone through various phases, and dating of its features is problematic. According to traditional historiography, it was originally the church of a monastery, one of those that grew, promoted by the nobility, around the capital city of the Visigothic Kingdom of Toledo, similar to the case of Santa María de Melque not far from S. Pedro de la Mata. This origin would allow us to date the first church between 589 (conversion of Visigothic nobility to Catholicism) and 711 (takeover of the Visigothic kingdom by Muslim invasion).