In the 8th century, the Umayyads created a Muslim dynasty in Spain, from which a culture flourished where Christians, Jews, and Muslims lived among each other, but non-Muslims had to pay a special tax.
Over time, the Christians chipped away at the Muslim lands, and the process sped up in 1002, when the Umayyad government broke up into seperate rival kingdoms. The Christians took advantage of this, and won a key victory in central Spain in 1085.
As Muslims gave up more and more land, the new dynasties were intolerant of Jews and Christians, and by 1248, only a small kingdom called Granada remained in Muslim hands.
Many Jews and Muslims remained living in areas ruled by Christians, and in 1400, Queen Isabella and King Ferdinand wanted to unite Spain as a Catholic country. They used Inquisition, a form of religious court, against Muslims and Jews who had converted to Christianity who were accused of practicing their old religions, and thousands were burned at the stake. They also sent armies into Granada in 1492, and the city fell, and Muslims lost their last stronghold in Spain. In the same year, 170,000 Jews left their homes because they wouldn't become Catholics, and many Muslims were forced to convert.