Junot's major command came on 29 July 1807, when Napoleon appointed him commander-in-chief of the "" (''Corps d'observation de la
Gironde''), which was destined for an invasion of Portugal. The army assembled in
Bayonne over the next two months, and was later reinforced with a Spanish contingent under the terms of the
Treaty of Fontainebleau (27 October 1807). Departing on 17 October at the head of about 26,500 soldiers, Junot led his troops on an arduous march through Spain, finally crossing into Portugal at
Segura on 19 November. Facing little to no resistance, Junot's army advanced towards
Lisbon, seizing
Castelo Branco on 20 November and
Abrantes two days later. On 24 November, he was informed that the country's regent, Prince João (the future King
João VI) was preparing to
flee to Brazil along with his mother, Queen
Maria I, and the court. Junot entered Lisbon without a fight on 30 November, three days after the royal family's departure. (1808) French and Spanish troops soon occupied the rest of Portugal. For his success, Junot was granted the
victory title of
Duke of Abrantes (''Duc d'Abrantès
) by Napoleon, though he was not made a Marshal of the Empire as he expected. He set up his headquarters at the Quintela Palace in Lisbon, as the head of the military administration in Portugal. From late December 1807 to March 1808, Junot enacted far-reaching measures, such as the disbandment of the Portuguese Army (with around 9,000 soldiers joining the Grande Armée'''s
Portuguese Legion) and local
militias, the proclamation of the dethronement of the
House of Braganza, and the confiscation of royal assets. In January 1808, initial incidents of Portuguese resistance to the occupation occurred. Additionally, after the
Dos de Mayo Uprising in
Madrid, all Spanish troops withdrew from Portugal, and by June, popular revolts had spread throughout the country. On 1 August 1808, a British expeditionary force landed at the mouth of the
Mondego river. After a French defeat at
Roliça, Junot himself was beaten at the
Battle of Vimeiro on 21 August 1808, and he was cut off from France. Only the signing of the advantageous
Convention of Cintra with the British allowed him to avoid capture, taking with him "the weapons and baggages" and the loot the army had managed to gather—an expression that later became famous in Portuguese usage. He went back to France in October. The terms of the Convention caused widespread outrage in Britain. ==Later career==