 After Pedro's decision to defy the "Cortes", around 2,000 men led by Jorge Avilez rioted before concentrating on mount Castelo, which was soon surrounded by 10,000 armed Brazilians, led by the Royal Police Guard.Dom Pedro then "dismissed" the Portuguese commanding general and ordered him to remove his soldiers across the bay to Niterói, where they would await transport to Portugal.Jose Bonifácio was nominated minister of Kingdom and Foreign Affairs on 18 January 1822.