On 22 April 1809 Sir Arthur Wellesley, later Duke of Wellington, disembarked in Lisbon, and took over the command of all the Anglo-Portuguese troops whereupon Beresford was nominated Marshal General of the Portuguese Army. The allied armies marched to the North. Wellington moved from Coimbra directly to Porto, which he entered on 12 May, and Beresford marched through the Province of Beira, arriving that same day at the banks of the Douro river, in the area of Lamego. Wellington's troops made a forced crossing of the Douro and defeated the French, forcing their Marshall-general Jean-de-Dieu Soult to withdraw from Porto. Soult was outnumbered and expelled from Portugal; the positioning of Beresford's forces compelled the French to leave Portugal by the poor roads through Montalegre. They managed to cross the border only after sacrificing their artillery and baggage, and faced numerous difficulties during the evacuation.