With the upheaval which occurred at the beginning of the nineteenth century, a new order came into being, so far as the Spaniards and Portuguese were concerned. The parting of the ways was now marked. It is, indeed, curious to notice that, while Spanish South America was strenuously engaged in transforming itself from the status of a royal colony to that of a group of independent republics, an operation was being carried out in Brazil, the effect of which was precisely the reverse.

Brazil, in fact, in place of the neglect of centuries from which she had suffered, now underwent a sudden, dazzling, and altogether unexpected shower of honours and distinctions. That this did not come about spontaneously affected the colony but little; the fact remained that she was destined in a remarkably short space of time to rise from a colony to a kingdom, and from a kingdom to an empire. The circumstances which led to this transformation were sufficiently dramatic in themselves.

In order to preserve the thread of these rather complicated events, it is necessary to transfer the scene for a short while to Western Europe, where at the moment the armies of Napoleon were sweeping all before them.

In 1807, when the French troops under Junot were on the eve of entering Lisbon, the Portuguese Royal Family embarked on a Portuguese man-of-war, and, escorted by a Portuguese fleet, sought the protection of the British Fleet under Sir Sidney Smith.

The move was effected only just in time, and the Prince Regent's confidential servant, who embarked just after the rest, left his departure so late that he was obliged to forsake some of his papers, his money, and even his hat, on the beach. Sir Sidney Smith convoyed the fleet as far as latitude 37° 47' north, after which he left them under the protection of the Marlborough, the London, the Monarch, and the Bedford. Almost at the same time Sir Samuel Hood and General Beresford took possession of the Island of Madeira, holding it in trust for Portugal.

The royal party landed at Bahia on January 21, 1808. So enthusiastic was their reception that they remained in the town for a month. While at Bahia the Regent gave promise of his future good-will and liberality by promulgating a carta regia, dated January 28, by which he opened the ports of Brazil to general commerce, levying on imports only a moderate duty, and permitting exports of all articles under any flag, with the exception of one or two articles which still remained royal monopolies.

The departure of the Royal Family from Bahia was rendered necessary by strategic considerations, for, owing to its peculiar situation, the town could easily have been cut off from the rest of the mainland by hostile forces. The royal party therefore sailed south, and arrived in Rio de Janeiro on March 7.

The joy in the port at the arrival of the Regent and his party manifested itself in an excitement approaching delirium on the part of the officials and populace. The mountains and the waters of the bay were illuminated night after night with Bengal fires, rockets, and similar fireworks, and every possible demonstration of joy known to the colonists was continued unbroken for nine days. In the meanwhile the inhabitants were preparing the beautiful site of the town for its promotion as a capital city of a kingdom and the residence of a King.

Indeed, in material advantages Brazil benefited almost immediately from the arrival of the Portuguese Royal Family. In the first place, as has already been explained, on January 28, 1808, the Prince Regent abolished the old exclusive system, and opened the ports of Brazil. A local writer, referring with enthusiasm to this, said the edict "ought to be written in letters of gold."

New desires, new habits, and new objects, were now introduced, and came crowding one after the other in haste into the wonderful tropical regions of the Bay of Rio de Janeiro. Printing was legalized with the arrival of the Prince Regent, who brought over with him his library, and this, in 1814, was thrown open to the public. The progress of science went hand in hand with that of the rest, and in 1811 vaccination was introduced. The pleasant arts were not left out in the cold, since, in 1813, the first regular theatre was opened. In 1814 the French were invited to come over as residents, and they accepted in numbers.