In the Middle Ages, Spain had been divided between small Christian kingdoms in the north and larger Muslim ones in the south. The Crusades were part of a centuries-long series of wars the Christian Spaniards called the Reconquest, which reached its culmination in the late fifteenth century. Spain became a powerful and united kingdom for the first time when the monarchs of two of the Christian kingdoms were married in 1479: Queen Isabella of Castile and King Ferdinand of Aragon. During their own lifetimes Aragon and Castile remained independent of one another, though obviously closely allied, but the marriage ensured that Isabella and Ferdinand’s daughter Joanna and her son Charles V would go on to rule over Spain as a single, unified kingdom.
The “Catholic monarchs” as they were called were determined to complete the Reconquest of the Iberian peninsula, and in 1492 they succeeded in doing so, capturing Grenada, the last Muslim kingdom. Full of crusading zeal, they immediately set about rooting out "heretics" like the kingdom's large Jewish population, forcing Jews to either convert to Catholicism or leave the kingdom that same year. In 1502 they gave the same ultimatum to the hundreds of thousands of Muslims as well. Most Jews and Muslims chose to go into exile, most to the relatively tolerant and economically prosperous kingdoms of North Africa or the (highly tolerant by the standards of European kingdoms at the time) Ottoman Empire.
The Spanish monarchs also attacked the privileges of their own nobility, in some cases literally destroying the castles of defiant nobles and forcing nobles to come and pay homage at court (in the process neutralizing them as a threat to their authority). After Christopher Columbus’s “discovery” of the New World in 1492, recalcitrant nobles were often shipped off as governors of islands thousands of miles away. They also succeeded in reforming the tax system to get access to more revenue, especially by taxing trade, and so by 1500 the Spanish army was the largest and most feared in Europe.
In many ways, the sixteenth century was “the Spanish century,” when Spain was the most prosperous and powerful kingdom in Europe, especially after the flow of silver from the Americas began. Spain went from a disunited, war-torn region to a powerful and relatively centralized state in just a few decades.