Pirenaica is the most important autochthonous cattle breed within the Protected Geographic Indication (PGI) beef quality label in the Basque region, in northern Spain. The short tandem repeats (STRs) are powerful markers to elucidate forensic cases and traceability across the agri-food sector. The main objective of the present work was to study the phylogenetic relationships of Pirenaica cattle and other breeds typically raised in the region and provide the minimum number of STR markers for parentage and traceability purposes. The 30-STR panel recommended by the International Society of Animal Genetics-Food and Agriculture Organization of the United Nations (ISAG-FAO) was compared against other commercial STR panels. The 30-STR panel showed a combined matching probability of 1.89 × 10-25 and a power of exclusion for duos of 0.99998. However, commercial STR panels showed a limited efficiency for a reliable parentage analysis in Pirenaica, and at least a 21-STR panel is needed to reach a power of exclusion of 0.9999. Machine-learning analysis also demonstrated a 95% accuracy in assignments selecting the markers with the highest FST in Pirenaica individuals. Overall, the present study shows the genetic characterization of Pirenaica and its phylogeny compared with other breeds typically raised in the Basque region. Finally, a 21-STR panel with the highest FST markers is proposed for a confident parentage analysis and high traceability.