Perhaps from Mozarabic, perhaps from Latin Pācem Augustam. /st/ > /t͡s/ is characteristic of Mozarabic. Compare Arabic بَطَلْيَوْس (baṭalyaws).
Practice speaking and memorizing "Badajoz" and many other words and sentences in Spanish.