- Ferdinand died on Jan. 23, 1516, and the crowns of the Spanish kingdoms devolved on his grandson, Charles I (1516-56), the ruler of the Netherlands and heir to the Habsburg dominions in Austria and southern Germany. When Charles arrived in Spain, in September 1517, the country was apprehensive of the rule of a foreigner. Charles, inexperienced, speaking no Spanish, and surrounded by Burgundian councillors and courtiers, did not initially make a good impression. The different Cortes of Castile, Aragon, and Catalonia granted his financial demands but attached to them much pointed advice and criticism.
On June 28, 1519, Charles was elected Holy Roman emperor as Charles V and prepared to go to Germany. As Charles set sail (May 20, 1520), the Castilian revolution had already begun. The towns, led by Toledo, formed a league and set up a revolutionary government. When the more radical and popular elements in the cities were gaining control of the comunero movement and beginning to spread it to the nobles' estates did the nobles combine to raise an army and defeat the comunero forces at Villalar (April 23, 1521).
After Villalar the Spanish nobility had come to accept Charles I. His championing of Roman Catholic Christianity against the Muslim Turks and German heretics appealed to their own traditions of Christian warfare against the Muslims in the Spanish Peninsula and North Africa. Even though Charles spent only 16 of the 40 years of his reign in Spain, the Spanish upper classes were beginning to accept and enjoy their monarch's position as the greatest ruler in Europe.
Spain as a result, however, became involved in interminable wars. The necessity of defending southern Italy from the Turks brought Charles's empire into collision with the Ottoman Empire, with the central Mediterranean as the chief battleground. Ferdinand's failure to complete the conquest of North Africa now brought a bitter revenge. The corsair leader Khayr ad-Din, known as Barbarossa, had made himself master of Algiers (1529) and acknowledged the suzerainty of the sultan of Constantinople. In 1535 Charles captured Tunis. He now seriously considered carrying the war into the eastern Mediterranean, even conquering Constantinople itself. But in 1538 Barbarossa with a Turkish fleet defeated Charles's Genoese admiral, Andrea Doria, at Préveza (western Greece), and in 1541 the emperor himself failed against Algiers. At the end of the reign, the balance of the two great naval powers in the Mediterranean, the Spanish and the Turkish, was still even.
Rival claims to Naples by the Aragonese and the Angevins (cousins of the ruling French house) also brought conflict with the French kings, against whom Charles fought four wars. His armies conquered Milan (northern Italy) and reduced most of the still independent Italian states to Spanish satellites.
In 1556, Philip II became king when on Jan. 16, 1556 Charles resigned in Philip's favour the kingdoms of Spain and the Spanish overseas empire. The court, which was at first in Toledo, was established in Madrid (1560).
In the Mediterranean the Spanish fleet was inferior to that of the Turks, and Philip had to remain on the defensive, even when the Turks were besieging Malta (1565). However, the Turks' failure to capture the island from the Knights of St. John, who had leased it from Charles V in his capacity as emperor, marked the end of their great offensive. Six years later the combined Spanish, Venetian, and papal fleets - in alliance the numerical equals of the Turks - virtually annihilated the Turkish fleet at Lepanto (1571). The strategic effects of this great victory were negligible, but its moral effects were immense. It confirmed the Spaniards in their chosen role as champions of Christendom and explains much of their continued willingness to support their king's religious and imperial policies, even in the face of ruinous costs and mounting disasters. After Lepanto, however, it became clear that the stalemate in the Mediterranean could not be broken. In 1580 Spain signed a truce with the Sublime Porte (Turkish government).
From about 1580 the Spanish government became convinced that the rebellion (1568-1609) and heresy in the Netherlands could not be crushed as long as the rebels received help from England and France. Philip began to give financial aid to the Holy League, the ultra-Catholic party in France. From 1586 he prepared the invasion of England. The Armada, which set sail from Lisbon in May 1588, numbered about 130 ships and nearly 30,000 men, bravely and not at all incompetently commanded by the Duke de Medina-Sidonia. But it had been set an impossible task: that of convoying the army under Alessandro Farnese, Duke de Parma, from the Netherlands to England in the face of a better-armed English fleet and without control of a single deepwater channel port. The defeat of the Armada was probably inevitable but not dishonourable.
Spanish intervention in France from 1590 wa