The same month of July, 1808, in which Joseph Bonaparte was proclaimed King of Spain at Madrid, the British troops were despatched to Portugal. After Junot had been expelled from that kingdom the genius of Napoleon reorganized his armies, until the French in Spain numbered not less than four hundred thousand men, which he left divided into eight corps under as many generals and marshals. Soult invaded Portugal, and was promptly driven out by Wellington; while King Joseph, with eighty thousand men, was defeated at Talavera, July, 1809. During the ensuing winter Wellington constructed that famous line of earthworks, twenty-nine miles in length, known as the lines of Torres Vedras. The French had then captured every city of note in southern Spain except Cadiz, and Wellington foresaw the necessity of preparing an impregnable base for retreat, in case he was pursued by the overwhelmingly powerful forces of the enemy. His foresight was justified when General Massena, with sixty-five thousand soldiers, moved against him in the spring of 1810. He retreated slowly behind his lines of defence, taking with him all the available sustenance of the country, and Massena, unable to force the works, and in effect starvedout, after losing thirty thousand men, sullenly retreated northward. Following him cautiously, the English general, in the spring of 1811, overtook and whipped him in a battle fought in April, and for the third time rid Portugal of the French invaders.
After this, by a succession of skilfully planned battles, and with victory alternating defeat, Wellington persistently advanced, until in August, 1812, he entered Madrid; He had not yet accomplished his purpose, however, of ridding Spain of the French, who still had nearly two hundred thousand men in the field. He was compelled to retire again in the direction of his protecting earthworks but in the spring of 1813, finding himself now commander-in-chief of an army of two hundred thousand men, seventy thousand of whom were Anglo-Portuguese veterans, Wellington advanced boldly northward, and at Vittoria, on the 21st of June, met and over-whelmingly defeated the French under King Joseph, who fled from the field "with a Napoleon (coin) in his pocket, and leaving another Napoleon in a predicament." After that, Wellington's advance was an almost uninterrupted series of victories, until, by February, 1814, he was well over the frontier and investing cities on the soil of France. But by that time Bonaparte himself was a fugitive, having abdicated, and the capital of France was in possession of the allied armies.
In this manner did the British fight the battles of Spain and drive from her soil the armies of France. It was not altogether a disinterested task, of course, but a sagacious move of the highest diplomacy, for, as England's ministry had foreseen, Spain became the "grave of France." By continually weakening his armies to accomplish her conquest, Napoleon only paved the way for the complete triumph of his enemies in the north: the allied forces of Prussia, Russia, and Austria.. Wellington received great rewards from his own country, and Spain eventually bestowed upon him vast estates, which his descendants own to-day. Here, also, he first met and checked the great conqueror of Europe; and he utilized the invaluable experience of this five-years' war the next summer, when, on the field of Waterloo, he finally crushed Napoleon, and drove him into eventual exile at St. Helena. He may truly be called the saviour of Spain, for, aside from a few detached battles and a desultory though persistent guerrilla warfare, the Spaniards conducted no wise scheme of defence. The battle of Vittoria shows the relative parts played by them and their allies, when their total loss was but 553 the Portuguese 1,049, and the English 3,308. This was the end of the great "Napoleonic storm cloud" that burst over distracted Europe and shattered against the Spanish Pyrenees.
"The unfortunate war in Spain was the first cause of the misfortunes of France," wrote the exiled Napoleon years afterward, when in St. Helena. His first step, after he found it impossible to retain Joseph on the Spanish throne, was to treat with Ferdinand, still a prisoner, in December, 1813. But before he could return the latter to his county he himself was deposed, and another Boubon, Louis XVIII, had entered Paris as the choice of the allied conquerors.
Amid universal ovations Ferdinand assumed his intermitted reign, first promising to support the liberal Constitution which the Cortes presented for his acceptance. The Spaniards had spent more time in framing a Constitution than in fighting, and this guarantee of the people's rights was a very liberal instrument—on paper. If Ferdinand had kept his pledges to sustain it, his would have been a very limited instead of the very absolute monarchy it was. But he did not keep his word, for the Inquisition, which had been abolished, was restored; the Jesuits were recalled; and of the liberal statesmen, who had at heart the good of Spain, some were sent to the galleys, and others executed. In fact, the despicable Ferdinand had learned nothing in his exile; a true Bourbon, he was at perpetual enmity with the people and republican institutions. Yet his countrymen had recalled him, supported him in power, and bared their necks to the naked sword of his despotism. The ignorant masses certainly ruled in Spain when Ferdinand VII, "worst of the Bourbon kings," came back to his own. But even fools have feelings, and some of them rose against him in 1822, and he, true to his Bourbon instincts, called to his aid the Holy Alliance. French troops under the Duc d'Angouleme, to the number of one hundred and fifty thousand, came pouring into the peninsula, and stayed there five years, until the base monarch's hold upon his throne was fixed again.
Bolstered by foreign troops, Ferdinand gave vent to his brutal instincts by imprisoning thousands of his subjects who had ventured to protest against this incarnation of corruption and venality; he executed the leaders, banished others, and perpetrated atrocities such as he delighted in.
His most beneficent act toward his harried kingdom was the involuntary deliverance afforded by his death; but even then he left a legacy of civil war, that has lasted to the present time.
Like his great predecessor, Philip II, whom he so much resembled, he married thrice, his last wife being his niece (as was Philip's), Maria Christina, daughter of the King of Naples. Hitherto childless, Ferdinand was delighted, on the 18th of October 1830, at the birth of a daughter to Queen Christina. It was her birth that inaugurated the civil wars to which reference has been made, and of which we will treat in the following chapter.
Momentous events happened during the reign of Ferdinand VII, which reduced his kingdom from a world-embracing dominance almost to the confines of the Iberian Peninsula. When, in the first decade of this century, the Emperor of France turned his greed eyes toward Spain, she possessed territory now included in Florida, Mexico, Central America, all South America save Brazil; the islands of Cuba, Puerto Rico, and a portion of Santo Domingo in the West Indies, besides the Carolines and Philippines in the East, and her present possessions on and near the western coast of Africa and in the Mediterranean. When it was seen by her colonies that Spain was too weak to resist the imposition of a foreigner upon her throne, their bolder spirits realized that the moment had arrived for deliverance from her oppressions. The standard of revolt was raised in Mexico, 1808; in Venezuela, 1810; Buenos Ayres, Chili, and Peru followed the movement, until, before the death of Ferdinand, every American colony and every island had been lost to Spain except Cuba and Puerto Rico. Long and sanguinary were the struggles between the desperate Spaniards and the aspirants for freedom; but in the end the patriots conquered, and continental America was freed from Spanish misrule. Florida was ceded in 1819 to the United States, which ultimately acquired a vast portion of Mexican territory by conquest and treaty.