including the entire governmental administration and the judiciary, joined the royal family as they moved to Brazil, a possession of Portugal, and established the capital of the Portuguese Empire in Rio de Janeiro. First invasion General Jean-Andoche Junot and his troops had entered Spain on 18 October 1807 and crossed the peninsula to reach the Portuguese border. Junot encountered no resistance and reached Abrantes by 24 November, Santarém on 28 November, and the Portuguese capital at the end of the month, arriving a day after the Court had fled to Brazil. Before the Prince Regent departed, he left orders with the Regency Junta to greet the French in peace. Once he arrived, Junot promoted himself as a reformer come to liberate the oppressed people of Portugal, promising progress, the construction of roads and canals, efficient administration, clean finances, assistance and schools for the poor. Instead, he set about removing vestiges of the Portuguese monarchy, declared that the House of Braganza had ceased to reign in Portugal, suspended the Council of Regency, suppressed the Portuguese militia, billeted officers in the finest houses of the rich, and plundered the Portuguese treasury for continuing reparations to the French. Meanwhile, 50,000 Spanish and French troops roamed the countryside arresting, killing, plundering and raping the citizenry. By 1808, as Junot was busy redesigning Portuguese society, Napoleon decided to revise his alliance with Spain; he forced the abdication of Charles IV of Spain and his son Ferdinand, and installed his brother Joseph Bonaparte as King. A popular uprising in Spain immediately spread to Junot's forces, which were accompanied by Spanish troops, and further instigated a popular uprising by the Portuguese that was brutally put down after some minor successes. The following year, a British force commanded by Arthur Wellesley (future Duke of Wellington) disembarked in Galiza with the intent of supporting the Spanish, but later advanced on Porto and landed at Figueira da Foz on 1 August. The British-Portuguese forces advanced quickly on the French, defeating them at the Battle of Roliça (17 August) and later the Battle of Vimeiro (21 August). A two-day armistice was observed as negotiations proceeded and the belligerents formally signed the Convention of Sintra (30 August), without Portuguese representation. As part of the accord, the British transported the French troops to France, with the product of sacks made in Portugal. The Convention benefited both sides: Junot's armies, incapable of communicating with