In 1492, Ferdinand and Isabella had captured Granada (the southern bit of the Iberian peninsula) and for this had received the title of Most Catholic Monarchs. 'Will there ever be an age so thankless as do not hold you in eternal gratitude?' asked the Pope with all feeling, and he himself had footed a large part of the war bill. There had originally been about 500,000 Moors in Granada, of whom about 100,000 died in the fighting or were enslaved, 200,000 fled (mainly to North Africa) and 200,000 stayed. Those that stayed were allowed to retain their dress, custom, religion and language. This tolerance wasn't to last, and during the reign of Charles V all Moors were ordered to abandon their religion, dress and customs and become practicing Christians. Henceforth they would be known as Moriscos, and their obedience would be enforced by the Inquisition.
At first though, not all of these edicts were enforced. The Catholic landowning nobles in the South made quite a lot of money off their Morisco tenants and hence were willing to protect them to a degree against Orthodox Catholic hostility. The Marquis of Mondejar, who was Captain-General of Grenada, thus shielded the Moriscos from the worst during the reign of Charles V. But when Philip II came to power things started to change. In 1559, Crown officials travelled around the South of Spain checking land deeds and titles, and confiscating those which people could not prove ownership of. Almost all the victims were Moriscos, and 100,000 hectares of land passed from them to the Crown in the period 1559-68. Furthermore, the Crown started to slap extra export taxes on silk, which was the Moriscos main source of livelihood - the Crown was following an age-old European practice of squeezing every last penny out of an unpopular minority, and eventually a breaking point would be reached, as it had done whenever this was tried before. Bad harvests only compounded the problem.
If we add a bit of race hatred and religious zeal to the problem, we get the final equation which resulted in explosion. At these times Philip II was involved in a series of wars with the Ottoman Empire, which was the only entity in the World able to challenge him - and consequently the rest of Christendom - successfully. Turkish privateers - the Barbary Pirates - and the Ottoman Navy constantly harrassed him in Africa, on the Mediterranean islands, and even attacked the Spanish shore. There was a growing belief that the Moriscos were fifth-columnists, that is that they were preparing to assist a Muslim invasion of mainland Spain from within. It was believed that they had contact with various Muslim communities and passed information to them. This led to an attempt in 1563 to disarm them, which was largely unsuccessful. Growing increasingly wary, Philip ordered the Marquis of Mondejar to hand over control of Grenada to the Inquisition and audencia (Castilian high court). The Inquisition was not known for its gloves-on approach. The Moriscos had had enough.
On Christmas Eve of 1568, the revolt started in Grenada. Fifty per cent of the population in Grenada were Moriscos, which meant two things: one, there were a lot of them and two, there were a lot of Christians for them to kill. At its height, the rebellion involved 30,000 Moriscos. By comparison, Don John of Austria (who was leading the Crown forces), had only 20,000 poorly-trained men, who proceded to rape and pillage their way through Morisco communities. And the Moriscos didn't behave much better. They threw Augustinian monks into cauldrons of boiling water and packed the curate of Manena with gunpowder and blew him up. Don John had 2,500 people killed in one village (including women and children). And then the Moriscos found out Philip was planning to deport them all, and things got really nasty. In the end things were brought under control, at the loss of about 60,000 Spanish lives. It could have been a lot worse - for a start, only the Grenadian Moriscos had risen up. Secondly, Muslim states could have intervened a lot more. The Siege of Malta in 1565 was making the Spanish very fearful at this time, although the lifting of the siege (1567) and the Battle of Lepanto (1571) disabled the Turks for a while.
It was decided that to prevent further trouble, the Moriscos should have their communities broken up and be scattered throughout the Iberian peninsula. This wasn't very popular, although the rebel leader actually submitted to this on promise of a free pardon for all. He was later strangled by his own guards. About 100,000 Moriscos were shackled and marched to various parts of the country, with 20,000 dying in transit. There was racial tension in some areas but the agricultural skills of the Moriscos were generally welcomed, and they resumed paying protection money to the Inquisition. Grenada suffered massively, losing about a quarter of its population. Some Christians moved in to take up the land but many settlements were left empty, which Moriscos proceded to try and sneak back to. The Inquisition deported people who tried this, and Philip II repeatedly considered a mass deportation. Reports that the Turks was planning a co-ordinated strike on Spain's dominions increased his fears.
Then, during the reign of Philip III, in 1609, the Moriscos were finally expelled. It's not entirely certain why this happened - it could have been because leading Crown advisors stood to gain large amounts of land, it could have been the Spanish obssession with "purity of blood" (the Spanish saw themselves as God's chosen race). Europe was quick to condemn the actions of the Spanish government (more fuel for the 'Black Legend' fire), as many of the 300,000 expelled died in transit. Spain actually suffered massively from losing a fairly productive sector of its population and nobles in Aragon and Valencia lost a large number of tenants. The splitting up of Morisco communities seems to have been successful though, because they didn't put up a lot of resistance.
Killsy, Jill. Spain Rise and Decline 1474 - 1643: Hodder & Stoughton, 1986.
Lotherington, John. Years of Renewel European History 1470-1600: Hodder & Stoughton, 1989.
Woodward, Geoffrey. Philip II: Longman, 1992.