Original: The pirates did not have to contend with any central authority until the Alaouite Dynasty united Morocco in 1666.
Simplified: The pirates did not have to fight with any central authority until the Alaouite Dynasty united Morocco in 1666.