By the time of the creation of the United Kingdom of Portugal, Brazil and the Algarves, Queen Maria I was long incapacitated, and the Portuguese Empire was ruled by Prince John, the future King John VI, as Prince Regent.