Spain rise from fragmented, occupied peninsula to global power was due to many different factors.
First, the Reconquista, or expulsion of the Moors, left Spain with several advantages. Isabela and Ferdinand were married, creating a unified catholic nation from the powerful states of Aragon and Castile. The army that finally defeated the Moors was one of the finest in Europe. Spain also ended up capturing a lot of cultural and financial wealth from the fleeing Moors and the later expulsion of the Jews during the Inquisition. When the Reconquista finally wrapped up Spain was one of the wealthiest, most stable, and most powerful nations in the world.
Capitalizing on this wealth, Spain began to expand its territory by launching voyages of discovery aimed at finding new trade routes to the east. Spain hired foreign mariners from Italy and France to chart new routes that brought even more wealth to Spanish markets. One such voyage, that of Christopher Columbus, resulted in Spain “discovering” the New World and becoming even more wealth and powerful. By the 16th century, Spain controlled a global trade empire that was policed by a navy of veteran captains.
There were some chinks in the Imperial armor. The empire was so rich that soon other nations began hiring privateers to raid Spanish shipping. Spain still made huge amounts of money, but a large percentage was stolen by nations like England. Spain also had to deal with constant wars in Europe, one of which robbed it of its entire fleet after an attempt to capture England went awry. Eventually the drains on its economy forced many of its financial institutions into bankrupcy, crippling the empire.