With the end of the Peninsular War in 1814, the courts of Europe demanded that Queen Maria I and Prince Regent João return to Portugal, deeming it unfit for the head of an ancient European monarchy to reside in a colony. In 1815, to justify continuing to live in Brazil, where the royal court had thrived for six years, the Crown established the United Kingdom of Portugal, Brazil and the Algarves, thus creating a pluricontinental transatlantic monarchic state. However, the leadership in Portugal, resentful of the new status of its larger colony, continued to demand the return of the court to Lisbon (''v.'' Liberal Revolution of 1820). In 1821, acceding to the demands of revolutionaries who had taken the city of Porto, D. João VI departed for Lisbon. There he swore an oath to the new constitution, leaving his son, Prince Pedro de Alcântara, as Regent of the Kingdom of Brazil.