The United Kingdom of Portugal, Brazil and the Algarves was a pluricontinental monarchy formed by the elevation of the Portuguese colony named State of Brazil to the status of a kingdom and by the simultaneous union of that Kingdom of Brazil with the Kingdom of Portugal and the Kingdom of the Algarves, constituting a single state consisting of three kingdoms.
The United Kingdom of Portugal, Brazil and the Algarves was formed in 1815, following the transfer of the Portuguese Court to Brazil during the Napoleonic invasions of Portugal, and it continued to exist for about one year after the return of the Court to Europe, being de facto dissolved in 1822, when Brazil proclaimed its independence. The dissolution of the United Kingdom was accepted by Portugal and formalized de jure in 1825, when Portugal recognized the independent Empire of Brazil.
During its period of existence the United Kingdom of Portugal, Brazil and the Algarves did not correspond to the whole of the Portuguese Empire: rather, the united kingdom was the transatlantic metropolis that controlled the Portuguese colonial empire, with its overseas possessions in Africa and Asia.
Thus, from the point of view of Brazil, the elevation to the rank of a kingdom and the creation of the United Kingdom represented a change in status, from that of a colony to that of an equal member of a political union. In the wake of the Liberal Revolution of 1820 in Portugal, attempts to compromise the autonomy and even the unity of Brazil, led to the breakdown of the union.