But the return of Bonaparte, followed as it was by the fall of the directory and the establishment of the consulate, commenced a new epoch for Spain. As soon as the first consul had time to turn his attention to the peninsula, he determined to restore Godoy, who had already regained the affec tion of the queen, and to make him the tool of his policy. Maria Luisa was easily gained over by playing on her devotion to the house of Parma, and on Oct. 1, 1800 a secret treaty was concluded at San Ildefonso. Spain undertook to cede Louisiana and to aid France in all her wars, while Bonaparte promised to raise the duke of Parma to the rank of king and to increase his territories by the addition either of Tuscany or of the Roman legations. This was followed by Godoy's return to power. Spain was now more servile to France than ever, and in 1801 was compelled to attack Portugal in the French interests. The Spanish invasion, commanded by Godoy in person, met with no resistance, and the prince ventured to conclude a peace on his own authority by which Portugal promised to observe a strict neutrality on condition that its territories were left undiminished. But Bonaparte resented this show of independence, and compelled Charles IV. to refuse his ratification of the treaty. In the preliminary treaty with Great Britain, Bonaparte ceded the Spanish colony of Trinidad without even consulting the court of Madrid, while he sold Louisiana to the United States in spite of his promise not to alienate it except to Spain. As soon as he saw himself involved in a new war with England, he turned to Spain for assistance and extorted a new treaty (Oct. 9, 1803), which was more burden some still than that of 1796. Spain had to pay a monthly sub sidy of 6,000,000 fr., and to enforce strict neutrality upon Portu gal, this involving war with England. The last remnants of its maritime power were shattered in the battles of Cape Finisterre and Trafalgar, and the English seized Buenos Aires.
In Oct. 1807 Spain accepted the Treaty of Fontainebleau. The treaty was hardly concluded when a French army under Junot marched through Spain to Portugal and the royal family of that country fled to Brazil. Ferdinand, whose wife had died in 1806, determined to imitate his rival Godoy by bidding for French support. He entered into secret relations with Eugene Beauharnais, Napoleon's envoy at Madrid, and went so far as to demand the hand of a Bonaparte princess. Godoy, who discovered the intrigue, induced Charles IV. to order his son's arrest (Oct. 27, 1807), on the charge of plotting to dethrone his father and to murder his mother and Godoy. The prince indeed was soon released and solemnly pardoned ; but, meanwhile, Na poleon had seized the opportunity afforded by this public scandal in lowering the prestige of the royal family to pour his troops into Spain, under pretext of reinforcing Junot in Portugal. Even this excuse was soon dropped, and by Jan. and Feb., 1808 the
French invasion had become clearly revealed as one of conquest. Charles IV. and his minister determined to fight. The news of this intention, however, excited a rising at Aranjuez, whither the king and the queen had gone from Madrid. A raging mob, instigated by highly placed people, surrounded the palace, clamouring for Godoy's head ; and the favourite's life was only saved by Charles IV.'s announcement of his abdication in favour of Ferdinand (March 17). Murat, however, who commanded the French, re fused to be turned aside by this change of circumstances. He ob tained from Charles IV. a declaration that his abdication had been involuntary, and occupied Madrid (March 23, 1808).
Attacks Spain.—Meanwhile Napoleon had ad vanced to Bayonne on the frontier, whither, at his orders, Murat despatched the old king and queen and their favourite Godoy. The emperor had already made up his mind to place one of his broth ers on the Spanish throne; but in order to achieve this it was necessary to cajole the young king Ferdinand VII. and get him into his power. Ferdinand, instead of retiring to Andalusia and making himself the rallying point of national resistance, had gone to Madrid, where he was at the mercy of Murat's troops and whence he wrote grovelling letters to Napoleon. It was no diffi cult matter for the emperor's envoy, General Savary, to lure him by specious promises to the frontier, and across to Bayonne, where he was confronted with his parents and Godoy in a scene of pitiful degradation. Struck and otherwise insulted, he was forced to restore the crown to his father, who laid it at the feet of Napoleon. The old king and queen, pensioned by the French Government, retired to Rome; Ferdinand was kept for six years under strict military guard at Talleyrand's chateau of Valencay (see FERDINAND VII., King of Spain). On May 13 Murat an nounced to an improvised "junta of regency" at Madrid that Napoleon desired them to accept Joseph Bonaparte as their king.
But Spanish loyalty and senti ments of independence were too profound to be daunted. For the first time Napoleon found himself confronted, not by terrified and selfish rulers, but by an infuriated people who rose against the French on that memorable day, May 2, 1808. The rising in Spain began the movement which ultimately proved fatal to Na poleon's power. At first he treated the novel phenomenon with contempt, and thought it sufficient to send his less prominent generals against the rebels. Madrid was easily taken, but the Spaniards showed great capacity for the guerrilla warfare (q.v.) in the provinces. The French were repulsed from Valencia; and Dupont, who had advanced into the heart of Andalusia, was com pelled, by a force entirely composed of Spanish troops and volun teers, to retreat and ultimately to capitulate with all his army at Baylen (July ro). The Spaniards now advanced upon Madrid, and drove Joseph from the capital, which he had just entered.