
In 1807 the Napoleonic Wars were not looking too great for Portugal. Queen Maria I and the royal family fled Lisbon days before French forces invaded. They traveled all the way to Brazil, where the capital of Portugal was no longer in Portugal. The royal family ruled in Rio de Janeiro rather than Lisbon until 1821.