History of Portugal (1777–1834)

Kingdom of Portugal and the Algarves
Reino de Portugal e dos Algarves (Portuguese)
1777–1834
Flag (1750–1816)
Anthem: 
Capital
Common languagesPortuguese
Religion
Roman Catholic
Government
Monarch 
 1777–1816
Mary I
 1816–1826
John VI
 1826
Pedro IV
 1826–1828
Mary II
 1828–1834
Miguel I
History 
1777
1807–1814
1822
1834
CurrencyPortuguese real
ISO 3166 codePT
Preceded by
Succeeded by
Kingdom of Portugal
Kingdom of Portugal

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.