The Franco-Spanish invasion force was led by General Jean-Andoche Junot, while the Portuguese were under the nominal command of Prince Regent John.
French and Spanish troops entered Portugal and swiftly occupied it in the face of little resistance due to the poor state of the Portuguese military.
Junot's troops occupied Lisbon on 30 November 1807, only to find that João and many of the leading families had escaped to Brazil aboard an Anglo-Portuguese fleet.
When the Treaties of Tilsit ended the War of the Fourth Coalition, Emperor Napoleon of France had already expressed irritation that Portugal was open to trade with the United Kingdom.
Furthermore, Prince John of Braganza, regent for his mentally ill mother Queen Maria I had failed to comply with the emperor's Continental System, a prohibition against British trade.
[2] On 19 July 1807, Napoleon ordered his Portuguese ambassador to inform that country to close its ports to British shipping by 1 September.
On 2 August the 1st Corps of the Gironde Army of Observation was officially brought into being, with General of Division Jean-Andoche Junot in command.
On 23 September, the emperor made his intentions clear when he publicly threatened to depose the Braganzas in front of the Portuguese minister to France.
John agreed to suspend diplomatic relations with Britain and close his ports, but he shrank from seizing British merchants and their goods.
The document was drawn up by Napoleon's marshal of the palace Géraud Duroc and Eugenio Izquierdo [es], an agent for Manuel de Godoy, Prince of the Peace.
Aside from his desire to occupy Portugal, his real purpose may have been to introduce large French forces into Spain in order to facilitate its subsequent takeover.
General Carrafa and 9,500 men were instructed to assemble at Salamanca and Ciudad Rodrigo and cooperate with Junot's main force.
The remaining 24 were titled Lippe, Albuquerque, Minas, 1st Armada, 2nd Armada, Cascaes, Setubal, Peniche, 1st Elvas, 2nd Elvas, Serpa, 1st Olivença, 2nd Olivença, Campo Major, Castello de Vide, Lagos, Faro, 1st Oporto, 2nd Oporto, Viana, Valença, Almeida, Gena Major, and Bragança.
These regiments were those of Caés, Alcantara, Mecklenburg, Elvas, Évora, Moira, Olivença, Almeida, Castello Branco, Miranda, Chaves, and Bragança.
Unknown to their Spanish allies, the French engineers were secretly taking notes about all fortresses and strategic points on their line of march.
On this rough road through hills and ravines, half of the army's horses died,[16] one-quarter of the soldiers straggled, and all but six artillery pieces were left behind.
The road along the Tagus valley was a mere track through a rocky wilderness, with Castelo Branco being the only substantial town in the area.
As the emperor's hostile intentions became more clear, John declared war on the United Kingdom on 20 October and seized the few remaining British subjects on 8 November.
Despite these events, John's government failed to mobilize the Portuguese regular army or call out the militia to defend the realm.
Understanding that the Portuguese were prostrate, Junot organized four battalions made up of his best remaining men and set out for Lisbon, which was still 75 miles (121 km) away.
Without a single cannon or cavalryman, 1,500 French troops staggered into Lisbon on 30 November, their cartridges soaked and their uniforms in tatters.
As Junot's army loomed closer, the Prince Regent dithered between offering complete submission and fleeing to Brazil.
Finally, Admiral Smith produced a 13 October edition of the Paris Moniteur which declared that the House of Braganza had been deposed.
With fifteen warships and more than twenty transports, the fleet of refugees weighed anchor on 29 November and set sail for the colony of Brazil.
Junot was instructed to seize the property of the 15,000 persons who had fled to Brazil[21] and to levy a 100 million franc fine on the nation.
As it happened, the refugees had carried off almost half of the specie in Portugal and the French were barely able to raise enough money to maintain the occupation army.
On 6 June 1808, news of the rebellion reached Porto where General Belesta was stationed with 6,000 Spanish troops, Taranco having died during the winter.
After seizing General of Division François Jean Baptiste Quesnel and his 30-man escort, Belesta marched his troops away to join the armies fighting the French.