The Moors spent as much time fighting among themselves as they did against the Christians in Iberia.
In Portugal, the Reconquista was accomplished more quickly and efficiently partly because of the Knights Templar, who were well established in the country. The Templars were invited in by Queen Consort Teresa I (the first true monarch of Portugal) in the early 1100s and were instrumental in retaking and protecting the south.
Conflicts between the three Christian Spanish kingdoms, along with considerations of geography, prevented Spain from eliminating the Moors completely until unification occurred in 1492.