At the moment when the insurrection occurred, 20,000 Spanish troops were in Portugal under the orders of Junot; 15,000 more under the Marquis de Roma were serving Napoleon in Holstein. There remained 40,000 Spanish regulars, 11,000 Swiss and 30,000 militia to combat 80,000 French soldiers then in possession of half of the chief fortresses of the country.
After various petty skirmishes, in which the French were uniformly successful, Bessieres came upon the united armies of Castile, Leon and Galicia, commanded by Generals Cuesta and Blak on the 14th of July at Riosecco, and defeated them in a desperate action in which not less than 20,000 Spaniards were killed. This calamitous battle opened the gates of Madrid to the new king, who arrived at the capital on the 20th of the month only to quit it again in less than a fortnight to take up his head quarters at Vittoria to preserve his safety. The English government, meanwhile, had begun its preparations for interfering effectually in the affairs of the peninsula. Thousands of English troops were landed, Dupont, Lefebvre and Junot meeting with reverses that resulted finally in the evacuation of the whole French army from Portugal.
The battle of Baylen was one of the first and most fatal reverses of the French. Here, after a desperate engagement on the 23rd of July, upwards of 18,000 men, under General Dupont, surrendered to the Spaniards, defiled before the Spanish army with the honors of war, and deposited their arms in the manner agreed on by both parties. General Dupont and all the officers concerned in the capitulation, who were permitted to return to France, were arrested and held in prison. Napoleon deeply appreciated the importance of the reverse which his armies had sustained, but he still more bitterly felt the disgrace. It is said that to the latest period of his life he manifested uncontrollable emotion at the mention of this disaster. Subsequently an imperial decree appeared, which prohibited every general, or commander of a body of men, to treat for any capitulation while in the open field; and declared disgraceful and criminal, and as such, punishable with death, every capitulation of that kind, of which the result should be to make the troops lay down their arms.
The catastrophe at Baylen and the valiant defense of Saragossa had in some measure opened the eyes of Napoleon to the character of the nation with whom he was contending. He acknowledged, too late, that he had imprudently entered into war, and committed a great fault in having commenced it with forces too few in number and too wildly scattered. On hearing of the ill-luck of his three generals, he at once perceived that affairs in the peninsula demanded a keener eye and a firmer hand than his brother's, and he at once resolved to take the field himself, to cross the Pyrenees in person at the head of a force capable of sweeping the whole peninsula "at one fell swoop," and restore to his brother's reign the auspices of a favorable fortune.
When setting out from Paris in the early part of October, 1808, the Emperor announced that the peasants of Spain had rebelled against their king, that treachery had caused the ruin of one corps of his army, and that another had been forced by the English to evacuate Portugal. Recruiting his armies on the German frontier and in Italy, he now ordered his veteran troops to the amount of 200,000, including a vast and brilliant cavalry and a large body of the Imperial Guards, to be drafted from those frontiers and marched through France towards Spain.
As these warlike columns passed through Paris Napoleon addressed to them one of those orations that never failed to fill them with enthusiasm. "Comrades," said he at a grand review which was held at the Tuileries on the 11th of September, "after triumphing on the banks of the Danube and the Vistula, with rapid steps you have passed through Germany. This day, without a moment of repose, I command you to traverse France. Soldiers, I have need of you. The hideous presence of the English leopard contaminates the peninsula of Spain and Portugal. In terror he must fly before you. Let us bear our triumphant eagles to the pillars of Hercules; there also we have injuries to avenge. Soldiers! You have surpassed the renown of modern armies; but you have not yet equalled the glory of those Romans, who, in one and the same campaign were victorious on the Rhine and the Euphrates, in Illyria and on the Tagus! A long peace, a lasting prosperity, shall be the reward of your labors. A real Frenchman could not, should not rest, until the seas are free and open to all. Soldiers, what you have done and what you are about to do, for the happiness of the French people, and for my glory, shall be eternal in my heart."
Having thus dismissed his faithful troops, Napoleon himself traveled rapidly to Erfurt, where he had invited the Emperor Alexander to confer with him. Here they addressed a joint letter to the King of England, proposing once more a general peace, but as they both refused to acknowledge any authority in Spain save that of King Joseph, the answer was in the negative. Austria also positively refused to recognize Joseph Bonaparte as King of Spain, and this answer was enough to satisfy Napoleon that she was determined on another campaign.
On the 14th of October the conference at Erfurt terminated, Napoleon sincerely believing himself the friend of Alexander, and little thinking he would one day say of him: "He is a faithless Greek!" Ten days later Napoleon was present at the opening of the legislative session at Paris, where he spoke with confidence of his designs and hopes in regard to Spain. "I depart in a few days to place myself at the head of my troops," he said, "and, with the aid of God, to crown the king of Spain in Madrid, and plant my eagles on the forts of Lisbon."