to withdraw with all its munitions of war. Results Following the Treaties of Tilsit, Britain and Sweden remained the only two major coalition members still at war with France. Russia soon declared war against Britain and after a British attack on Copenhagen, Denmark–Norway joined the war on the side of Napoleon (Gunboat War), opening a second front against Sweden. A short British expedition under Sir John Moore was sent to Sweden (May 1808) to protect against any possible Franco-Danish invasion. At the Congress of Erfurt (September–October 1808) Napoleon and Alexander agreed that Russia should force Sweden to join the Continental System, which led to the Finnish War of 1808–1809 (meaning Sweden played no role in the next coalition against Napoleon) and to the division of Sweden into two parts separated by the Gulf of Bothnia. The eastern part became the Russian Grand Duchy of Finland. Due to the Continental System, Britain was yet again still at war with Napoleon and was not affected by the peace treaty. In negotiations with captured Swedes after the Battle of Lübeck, Marshal Bernadotte first came to the attention of the Swedish authorities. This would set in motion a chain of events that eventually led to him being elected heir to the Swedish throne, and later King Charles XIV John of Sweden. As for the French, after the Treaty of Tilsit, the Empire was seemingly at its zenith. Flush with triumph and deeming France free from any immediate obligations in Central and Eastern Europe, Napoleon decided to capture the Iberian ports of Britain's long-time ally Portugal. His main aim was to close off another strip of the European coast and a major source for British trade. On 27 October 1807, Spain's Prime Minister Manuel de Godoy signed the Treaty of Fontainebleau with France, by which in return for the alliance and passage of French armies through its realm, Spain would receive Portuguese territory. In November 1807, after the refusal of Prince Regent John of Portugal to join the Continental System, Napoleon sent an army into Spain under General Jean-Andoche Junot with the aim of invading Portugal (as well as the secret task of being the vanguard for the eventual French occupation of Spain). Napoleon soon embroiled himself and France in Spain's internal power struggles within its royal family, eventually leading to the Spanish populace turning on the French occupiers and the beginning of the Peninsular