A French invasion under Marshal Junot followed, and the capital city of Lisbon was captured on 1 December 1807. British intervention in the Peninsular War, under Arthur Wellesley, 1st Duke of Wellington, helped to maintain Portuguese independence, the last French troops being expelled in 1812.