While various writers have attempted to name his parentage, (for example, making him son or brother of King Erwig), early sources say nothing more specific than the chronicle of 'Pseudo-Alfonso': that he was "ex semine Leuvigildi et Reccaredi progenitus" (descended from the bloodline of Liuvigild and Reccared I), and even this has been challenged as a possible politically motivated fiction created to support his descendants' later claim to exclusive kingship.
Peter, the provincial dux, led his people into refuge in the mountains, and after the local noble Pelayo of Asturias (Pelagius) started a rebellion against the Berber garrison, which they had managed to establish over the mountain passes in neighbor Asturias, Dux Peter and other western Galician nobles supported the election of Alfonso as new king or Princeps to lead against the common enemy.
Other scholars have said, that Pelayo may have been a Cantabrian relative, defending the western access to the Duchy through his own county seat, as that part of the modern province of Asturias was part then of the Cantabrian duchy and the Cantabria of classic Latin record.
After the Battle of Covadonga, in which Pelayo avoided defeat by the larger invading force, and managed to dislodge its governor Munuza altogether from Asturias, it seems likely that Peter sent his son to the court of Pelayo at Cangas de Onís.
It had been a Visigothic practice to send noble children to the royal court, this was thus a tacit admission of Pelayo's regality.