After several conflicts with local Barbary pirates sponsored by the Zayyanid sultans, Spain decided to invade Algeria and defeat the native Kingdom of Tlemcen.
ˈæftɚ sˈɛvɹəl kˈɑːnflɪkts wɪð lˈoʊkəl bˈɑːɹbɚɹi pˈaɪɹəts spˈɑːnsɚd baɪ ðə zˈeɪjɐnˌɪd sˈʌltənz, spˈeɪn dᵻsˈaɪdᵻd tʊ ɪnvˈeɪd ældʒˈɪɹiə ænd dᵻfˈiːt ðə nˈeɪɾɪv kˈɪŋdəm ʌv tˈiːlˈɛmsən.