In 1808 he was appointed Commander of the Portuguese Expedition, landing on 22 August after Junot's defeat at Vimiero to replace Wellesley and Burrard. He immediately halted Wellesley's pursuit of the beaten French to Lisbon. Lacking either confidence or intelligence, or both, on 31 August Dalrymple signed a truce with Junot allowing him to return to France in British ships with all his weapons, men and loot. This infamous truce, known as the Convention of Cintra, was denounced both in London and in Portugal. Dalrymple sailed for home to face an enquiry 4 October, and never held a field command again.