In 1823, one year following the independence of Brazil, the faculty and the students of the Academy of the Midshipmen had to choose either the Brazilian or the Portuguese nationality. Those that chose the Portuguese nationality returned to Portugal and the others remained in Brazil. Then, two academies come into existence: the Imperial Academy of Midshipmen ("Academia Imperial dos Guardas-Marinhas") in the Empire of Brazil (that would become the present Brazilian Naval School) and the Royal Academy of Midshipmen in the Kingdom of Portugal.