The Portuguese Royal Family leaves Lisbon to escape from Napoleonic troops.
The history of the kingdom of Portugal and the Algarves, from the First Treaty of San Ildefonso and the beginning of the reign of Queen Maria I in 1777, to the end of the Liberal Wars in 1834, spans a complex historical period in which several important political and military events led to the end of the absolutist regime and to the installation of a constitutional monarchy in the country.
In 1807, Napoleon ordered the invasion of Portugal and subsequently the royal family and its entire court migrated to Brazil, Maria I declaring the United Kingdom of Portugal, Brazil and the Algarves in 1815. This would be one of the causes for the declaration of Brazilian independence by Pedro I of Brazil in 1822, following a liberal revolution in Portugal.
The liberal period was stormy and short as Miguel of Portugal (Pedro's brother) supported an absolutist revolution endeavoring to restore all power to the monarchy. Pedro eventually returned to Portugal and fought and defeated his brother in the Liberal Wars in which liberalism prevailed and Portugal became a constitutional monarchy.