To reflect the change of the status of the Portuguese Monarchy, the Prince Regent John (future King John VI, at that time still reigning in name of his mother, Queen Mary I) established a new Royal coat of arms, where the Portuguese shield (representing Portugal and the Algarves) charged a blue-filled yellow armillary sphere (representing Brazil) surmounted by the same beret-bearing five-arched crown. The new coat of arms replaced the previous one in the Portuguese flags. Despite the end of the United Kingdom of Portugal, Brazil and the Algarves, when Brazil became independent in 1822, its coat of arms continued to be used, inclusive in flags, until the death of John VI in 1826. From then on, the previous coat of arms, without the armillary sphere, became in use again. John VI died in Lisbon in 1826. His elder son Peter, who had declared the independence of Brazil in 1822, becoming Emperor Peter I, succeeded to the Portuguese throne as Peter IV. Because the new Brazilian constitution did not allow further personal unions of Portugal and Brazil, Peter abdicated the Portuguese crown in favour of his elder daughter Maria da Glória, who became Maria II of Portugal. She was only seven years old, so Peter stated she would marry his brother Miguel who would act as regent. However, in 1828, Miguel deposed Maria and proclaimed himself king, abolishing the 1822 liberal constitution and ruling as an absolute monarch. This started the period of the Liberal Wars. The liberals formed a separate government exiled on the Azorean island of Terceira. This government issued two decrees establishing modifications to the national flag. While supporters of usurper King Miguel I still upheld the flag established by John VI, the liberal supporters imposed important changes on it. The background was equally divided along its length into blue (hoist) and white (fly); the armillary sphere (associated with Brazil) was removed and the coat of arms was centred over the colour boundary; and the shield reverted to the "French type" shape of John V. This new flag configuration was decreed solely for terrestrial use, but a variation of it was used as the national ensign. This ensign differed in the way the colours occupied the background (blue , white ) with a consequent positional shift of the arms. With the defeat and exile of Miguel in 1834, Queen Maria II returned to the throne and the standard of the victorious side was hoisted in Lisbon as the new national flag.