Well, the Moors/Musulmanes (that is, Muslim people) were in charge of Spain from 711 AD on.
The Christians in Spain wanted to reconquer what they thought of as their land. They started fighting in 718. But it took quite a long time, and was not exactly a good time for either side.
And it ended in 1238, according to the second site below. And in 1492 all the Muslim authorities were expelled from Spain.
It is interesting that for so long all the subcultures coexisted, then the Reconquista started and things like the Inquisition and the expulsion of the Jews happened.