The story
Its origins can be traced to the Saint Peter Orphans' School founded in 1739, and later renamed to Saint Joachim School in 1766.
The Imperial Colégio de Pedro II was established in 1837 as part of a drive for national unity under the monarchy.
The school is mentioned in the Brazilian Constitution, which says that it should remain under the Federal orbit.
From Wikipedia’s article on Colégio Pedro II, shared under CC BY-SA 4.0.3
