When he resolved upon the invasion and conquest of Portugal, the prince regent, afterwards Dom John VI., having no means of resistance, decided to take refuge in Brazil.
Before leaving Bahia, Dom John took the first step to emancipate Brazil, opening its ports to foreign commerce, and permitting the export of all Brazilian produce under any flag, the royal monopolies of diamonds and Brazil-wood excepted.
Still the progress of the republican spirit in Brazil caused Dom Joao to send to Portugal for bodies of picked troops, which were stationed throughout the provincial capitals.
The prince Dom Pedro, heir to the crown, who now for the first time took part in public affairs, actively exerted himself as a negotiator between the king and the troops, who were joined by bodies of the people.
As the king could not abandon Portugal to itself he determined at first to send the prince thither as regent, but Dom Pedro had acquired such popularity by his conduct in the revolution, and had exhibited such a thirst for glory, that the king feared to trust his adventurous spirit in Europe, and decided to go himself.