The landing of the wreck of Moore's army and the news of the Spanish defeats turned the temper of England from the wildest hope to the deepest despair; but Canning remained unmoved. On the day of the evacuation of Corunna he signed a treaty of alliance with the Spanish Junta at Cadiz; and the English force at Lisbon, which had already prepared to leave Portugal, was reinforced with thirteen thousand fresh troops and placed under the command of Sir Arthur Wellesley. "Portugal," Wellesley wrote coolly, "may be defended against any force which the French can bring against it." At this critical moment the best of the French troops with the Emperor himself were drawn from the Peninsula to the Danube; for the Spanish rising had roused Austria as well as England to a renewal of the struggle. When Marshal Soult therefore threatened Lisbon from the north, Wellesley marched boldly against him, drove him from Oporto in a disastrous retreat, and suddenly changing his line of operations, pushed with twenty thousand men by Abrantes on Madrid. He was joined on the march by a Spanish force of thirty thousand men; and a bloody action with a French army of equal force at Talavera in July, 1809, restored the renown of English arms.

The losses on both sides were enormous, and the French fell back at the close of the struggle; but the fruits of the victory were lost by a sudden appearance of Soult on the English line of advance, and Wellesley was forced to retreat hastily on Badajoz. His failure was embittered by heavier disasters elsewhere. Austria was driven to sue for peace by Napoleon's victory at Wagram; and a force of forty thousand English soldiers which had been despatched against Antwerp returned home baffled after losing half its numbers in the marshes of Walcheren.

The failure at Walcheren brought about the fall of the Portland Ministry. Canning attributed the disaster to the incompetence of Lord Castlereagh, an Irish peer who after taking the chief part in bringing about the union between England and Ireland had been raised by the Duke of Portland to the post of Secretary at War; and the quarrel between the two Ministers ended in a duel, and in their resignation of their offices. The Duke of Portland retired with Canning; and a new ministry was formed out of the more Tory members of the late administration under the guidance of Spencer Perceval, an industrious mediocrity of the narrowest type; the Marquis of Wellesley, a brother of the English general in Spain, becoming Foreign Secretary. But if Perceval and his colleagues possessed few of the higher qualities of statesmanship, they had one characteristic which in the actual position of English affairs was beyond all price. They were resolute to continue the war. In the nation at large the fit of enthusiasm had been followed by a fit of despair; and the City of London even petitioned for a withdrawal of the English forces from the Peninsula. Napoleon seemed irresistible, and now that Austria was crushed and England stood alone in opposition to him, the Emperor resolved to put an end to the strife by a vigorous prosecution of the war in Spain. Andalusia, the one province which remained independent, was invaded in the opening of 1810, and with the exception of Cadiz reduced to submission; while Marshal Massena with a fine army of eighty thousand men marched upon Lisbon. Even Perceval abandoned all hope of preserving a hold on the Peninsula in face of these new efforts, and threw on Wellesley, who had been raised to the peerage as Lord Wellington after Talavera, the responsibility of resolving to remain there.

But the cool judgement and firm temper which distinguished Wellington enabled him to face a responsibility from which weaker men would have shrunk. "I conceive," he answered, "that the honour and interest of our country require that we should hold our ground here as long as possible; and, please God, I will maintain it as long as I can." By the addition of Portuguese troops who had been trained under British officers, his army was now raised to fifty thousand men; and though his inferiority in force compelled him to look on while Massena reduced the frontier fortresses of Ciudad Rodrigo and Almeida, he inflicted on him a heavy check at the heights of Busaco, and finally fell back in October, 1810, on three lines of defence which he had secretly constructed at Torres Vedras, along a chain of mountain heights crowned with redoubts and bristling with cannon. The position was impregnable; and able and stubborn as Massena was he found himself forced after a month's fruitless efforts to fall back in a masterly retreat; but so terrible were the privations of the French army in passing again through the wasted country that it was only with forty thousand men that he reached Ciudad Rodrigo in the spring of 1811. Reinforced by fresh troops, Massena turned fiercely to the relief of Almeida, which Wellington had besieged; but two days' bloody and obstinate fighting in May, 1811, failed to drive the English army from its position at Fuentes d'Onore, and the Marshal fell back on Salamanca and relinquished his effort to drive Wellington from Portugal.

Great as was the effect of Torres Vedras in restoring the spirit of the English people and in reviving throughout Europe the hope of resistance to the tyranny of Napoleon, its immediate result was little save the deliverance of Portugal. The French remained masters of all Spain save Cadiz and the eastern provinces, and even the east coast was reduced in 1811 by the vigour of General Suchet. While England thus failed to rescue Spain from the aggression of Napoleon, she was suddenly brought face to face with the result of her own aggression in America. The Crders in Council with which Canning had attempted to prevent the transfer of the carrying trade from English to neutral ships, by compelling all vessels on their way to ports under blockade to touch at British harbours, had at once created serious embarrassments with America. In the long strife between France and England, America had already borne much from both combatants, but above all from Britain. Not only had the English Government exercized its right of search, but it asserted a right of seizing English seamen found in American vessels; and as there were few means of discriminating between English seamen and American, the sailor of Maine or Massachusetts was often impressed to serve in the British fleet.