Following the Treaty of Fontainebleau signed between France and Spain in October 1807, which provided for the invasion and subsequent division of Portuguese territory into three kingdoms, French troops under the command of General Junot entered Portugal, which requested support from the British. Thus, in July 1808 troops commanded by the Duke of Wellington landed in Portugal, advanced towards Lisbon and defeated French troops at the Battles of Roliça and Vimeiro, forcing Junot to surrender. In March 1809, Marshal Soult led a new French expedition that advanced south to the city of Porto before being repulsed by Portuguese-British troops and forced to withdraw.