The House of Braganza became the reigning house of Brazil, first, when the United Kingdom of Portugal, Brazil, and the Algarves was created in 1815. The United Kingdom lasted until 1822, when the Brazilian Empire became independent from Portugal. The new Brazilian nation was led by Prince Pedro of Braganza, heir to the Portuguese throne, who ruled as Emperor Pedro I of Brazil, as well as King Pedro IV of Portugal. Until 1835, the Portuguese Braganzas were still in the line of succession to the Brazilian throne. The House was deposed (removed) from the Brazilian throne, in 1889, when Brazil was proclaimed a republic.