In 1808, Napoleon Bonaparte invaded Portugal, and Dom João, Prince Regent in place of his mother, Queen Maria I, ordered the transfer of the royal court to Brazil. In 1815 Brazil was elevated to the status of Kingdom, the Portuguese state officially becoming the United Kingdom of Portugal, Brazil and the Algarves ("Reino Unido de Portugal, Brasil e Algarves"), and the capital was transferred from Lisbon to Rio de Janeiro, the only instance of a European country being ruled from one of its colonies. There was also the election of Brazilian representatives to the Cortes Constitucionais Portuguesas (Portuguese Constitutional Courts), the Parliament that assembled in Lisbon in the wake of the Liberal Revolution of 1820.